DECLARE

Database

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

1 REPLY
Enthusiast

Re: DECLARE

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.