Hi, everyone. I'm new in Teradata and SQL
Please, could you write me an example of script with parameter. I coudn't find information how to write query.
For clear understandind what i mean:
I nead something like this
How will it be right in Teradata? Thank you!
If you are running in SQL Assistant, you can have parameters in your SQL and the values can be assigned at run tme. You need to do a ?variable as below. When you run the query, it will ask you for the value. If you are running this thru a batch script, like Unix or something, there are ways to pass parameters to the SQL
You can parameterize with many stuffs in unix or linux like below (say ksh file):
You can use parameters in multiple ways .... using a USING clause, using Macro or using Stored-Procedures.
But there isn't any way to use a variable like you wrote in your example, its kind off a C/C++ style variable .... which isnt as same as SQL style.