Link to home
Start Free TrialLog in
Avatar of jjrr007
jjrr007

asked on

If Statement With Teradata Query

I need to run a specific query if the date is the ninth of the month.  A different query would need to be run if the date is any other date except the ninth.  I wanted to please ask for the syntax to do this with Teradata.

Something like this is what I need (using MS SQL syntax):
IF ( day(getdate()) = 9)
Begin Select * From Table End
Else
Begin Select *From AlternativeTable End
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America 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 jjrr007
jjrr007

ASKER

Clever idea. Thanks