Home
Certification Preparation
Microsoft
SQL Server exams
What query did you write today
DatabaseHead
In the spirit of SQL I thought it would be a cool idea to create a thread that shows any new type of SQL you might want to share with the community. Anything you think would be helpful. I love writing SQL and love seeing what others have to write. How you get around tough situations etc.
Updated
Also post articles you may find interesting in the database space that ties to MS.
Find more posts tagged with
Comments
iBrokeIT
' or 1=1'--
cyberguypr
What in the world! I came here to post the same thing. LOL!!!!
DatabaseHead
Well I guess I should follow up with something I like to use from time to time.
I'm not really in "IT" I work with data exclusively. One thing I like to use when managing a catalog is between dates
WHERE
GETDATE() BETWEEN DATEADD(MONTH, -1, A.PRC_EFF) AND ISNULL(DATEADD(MONTH, -1, A.PRC_END), '9999-01-01')
In this where I am looking back one month from when this script is executed. I have a JOB schedule to pull our catalog and **** into another table for ease of use, performance as well. The ISNULL is nice because it gives you the end date, since most end dates are null, this cast a value in there 9999-01-01 (Basically to the end of time).
The reason I am using the job is to pivot out our price points since our table in interleaved
DatabaseHead
Found this post in regards to master data management. Found this very insightful.
https://msdn.microsoft.com/en-us/library/bb190163.aspx
Quick Links
All Categories
Recent Posts
Activity
Unanswered
Groups
Best Of