Link to home
Start Free TrialLog in
Avatar of Clyde_Radcliffe
Clyde_RadcliffeFlag for Netherlands

asked on

Clueless about the right syntax. (GETDATE)

Question: I would like to use GETDATE() in combination with IF THEN.

SELECT datepart(mm,getdate()) WHEN 1 print ''yada yada yada" ELSE print "yoda yoda yoda"

Since I'm a noob with SQL I can't seem to get the notation right.
I have searched myself silly on the web for the answer but with no luck.
Could someone tell me what the correct notation should be?

Thanks in advance!

Best regards,
Clyde.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Clyde_Radcliffe

ASKER

@angelllll: Excellent! Thanks for the help!!!