R Plots

Technical Article

RE: T-SQL brain teaser, tricky sum for employee data.

  • Reply

Here is one solution...I do have one extra join to over state my thought process--Join pass for attributes and amount select sum(CD.amount)as amount from check_data CD, --Choose employees and dates for query (select SUB1.emplid,SUB1.payend_dt from --Temp pay (select a.emplid,a.payend_dt from check_data a, ps_job b where a.emplid=b.emplid and b.reg_temp='T' and b.effdt<=a.payend_dt)SUB1 LEFT OUTER JOIN --Regular pay […]

You rated this post out of 5. Change rating

2005-01-18

Technical Article

RE: Getting a Date from DateTime

  • Reply

Scalar UDF's like this are performance killers on larger tables. Compare the results of doing this with a UDF and a single SELECT statement. They should speak for themselves. While you will maybe save some keystrokes (and, hey, I'm completely with you at this point), I think you'll save them in the wrong place.

You rated this post out of 5. Change rating

2005-01-18

Blogs

Deleting Old Local Git Branches–#SQLNewBlogger

By

I had a lot of local branches for a repo (actually a few repos)....

Use Your Voice

By

If you want more of a career and less of a job, one thing...

Real-World SQL Mastery: Your Hands-On, Mess-Free Sandbox

By

Are you ready to take your SQL skills from theoretical to tactical? If you've...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers