SQL Server Forums – How to get date in t-sql?







Mike writes “Hi! What is the best way to get
date(yyyy,mm,dd) using t-sql against
sql 2000?

Best Answer:

Another interpretation of the question, “How to get a date in T-SQL?”:

Find out what your database’s interests are, and talk animatedly about them.

Use subtle flattery, “Wow, that’s a really nice stored procedure you got there.”

Don’t overemphasize or show too much interest in physical hardware and specs, most databases consider that shallow and sexist.

Remember that each database is unique, what works well for one may be a total disaster for another.

Always listen. CPU utilization might only be 7%, but that might be a problem for some databases. Be empathetic.

Don’t assume that because everything goes well at first that you’ll be granted full permissions to every part of the database. Work your way up to it, and enjoy the journey. Your database will appreciate the attention.

…and always remember, GetDate() will get you a date, but it may not turn out exactly the way you want it.

SELECT ThePerfectWoman
FROM AllTheWomenInTheWorld
WHERE HerInterests Like Mine
AND CurrentMate Is Null
AND CurrentlyLives IN (‘Yonkers’, ‘Bondi Beach’, ‘São Paulo’)
GROUP BY CASE WHEN AsManyAsWillHaveMe>AsManyAsMyStaminaWillAllow
THEN AsManyAsWillHaveMe ELSE AsManyAsMyStaminaWillAllow * 2 END
HAVING Max(Libido)>=Mine




— SQL Server Forums – How to get date in t-sql.

Loading Facebook Comments ...

Leave a Reply

Your email address will not be published. Required fields are marked *