on 11-24-2015 11:49 AM
Hi
How to declare a variable same as the table's column data type ..
Like I have a table employee and salary as a column
I want to create a variable salary_column salary as salary .
I have no idea what is the data type of salary ...
please suggest ..
Hi Surya,
You can easily find the data type for a column.
Go to Catalog - Expand your Schema - Tables - Table name (Employee) - Right click - Open Definition.
Once you know the data type you can declare it in sqlscript.
Please refer the below link to have an example:
Table Variable type definition.
Regards
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you considered to look for the syntax where it usually is defined? The documentation.
It's built right into SAP HANA Studio and also available online.
Just check the SQLScript documentation and you will find the syntax definition for how to define and use variables, structure programs and a lot more.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.