Irina Ceaparu
Dec 17, 2010 9:30:45 AM

Substitution variables - using DECLARE

What is the correct syntax for creating a substitution variable? I tried declare mo integer; set mo=08; and declare @mo as integer; set @mo=08; and it does not work. Thanks.


John Baker
Dec 19, 2010 11:59:59 AM

Substitution variables - using DECLARE

The answer to this question depends upon the back-end you are using. Refer to the documentation of your back-end. For example, if you are using SQL Server, you should be using the syntax for TransactSQL and if you are using Oracle, it should be PL/SQL JB >What is the correct syntax for creating a substitution variable? >I tried >declare mo integer; >set mo=08; >and >declare @mo as integer; >set @mo=08; >and it does not work. >Thanks.


Irina
Dec 20, 2010 8:27:33 AM

Substitution variables - using DECLARE

It's NetezzaSQL. The 2 options I described would have worked with TransactSQL or PL/SQL. I cannot find a different syntax for Netezza SQL. >The answer to this question depends upon the back-end you are using. Refer to the >documentation of your back-end. For example, if you are using SQL Server, you should >be using the syntax for TransactSQL and if you are using Oracle, it should be PL/SQL > >JB > >>What >is the correct syntax for creating a substitution variable? >>I tried >>declare mo integer; >>set mo=08; >>and >>declare @mo as integer; >>set @mo=08; >>and it does not work. >>Thanks.


John Baker
Dec 22, 2010 5:46:49 PM

Substitution variables - using DECLARE

Check the documentation for Netezza. AFAIK, Netezza's SQL is based on PostgreSQL. If you cannot find documents for Netezza, check PostgreSQL. >It's NetezzaSQL. The 2 options I described would have worked with TransactSQL or PL/SQL. >I cannot find a different syntax for Netezza SQL. > >>The answer to this question depends upon the back-end you are using. Refer to the >>documentation >of your back-end. For example, if you are using SQL Server, you should >>be using the syntax for TransactSQL and if you are using Oracle, it should be PL/SQL >> >>JB >> >>>What >>is >the correct syntax for creating a substitution variable? >>>I tried >>>declare mo integer; >>>set mo=08; >>>and >>>declare @mo as integer; >>>set @mo=08; >>>and it does not work. >>>Thanks.

Navigation

Social Media

Powered by 10MinutesWeb.com