KennLambing
Technical User
I'm trying to write a case statement in teradata. So far I have:
I get error 102 Incorrect syntax near 'Us/Central'. I would like to add the appropriate number of minutes to a start time to convert them all to Eastern Standard time. StartMinute is a column in one of the 4 tables I'm pulling from. If I omit the case statement piece, the query works fine. I've tried using " instead of '. I've tried using () instead of "", I've tried enclosing the "Startminute +" piece in single quotes, double quotes but it doesn't seem to help.
PS I'm fresh off the boat new to SQL/Teradata.
Code:
Select.....
Case StartMinute
When Config.tblManagementUnit.TimeZone 'US/Central' then (StartMinute+60)
When Config.tblManagementUnit.TimeZone "US/Pacific" then (StartMinute+180)
When Config.tblManagementUnit.TimeZone "US/Mountain" then (StartMinute+120)
Else (StartMinute +0)
End
From....
Where...
Group by...
Having...
PS I'm fresh off the boat new to SQL/Teradata.