All Forums Database
erics44 2 posts Joined 09/16
02 Sep 2016
DECLARE
/*com 021 mi*/

DECLARE Var_EmployeeID INTEGER;

Hi
I am new to the forum so hello all :)
i am from a sql server background so just finding my feet with teradata
ive writen the above code and i get a Query is Invalid error? Can i not declare variables in teradata?
Thanks
 
 
 
 

02 Sep 2016

You can define of parameter variables in Macors, Stored procedures and utilities such as Fastload, Mload etc. You cannot 'DECLARE' a variable outside of these. What are you trying to achieve by 'DECLARE'? If it is just to get values from sqls you can just mention them in the SELECT statement.

You must sign in to leave a comment.