Skip to Content
0
Sep 24, 2014 at 06:34 AM

Table variable in select query ?

137 Views

Hi,

I am new to HANA, and trying to learn on table variable.

What i know table variable is table type, used in procedure and select statement.

So i create a table type for table variable ( VIEW_OUTPUT ) and Calculation view (CALV_2).

and in SQL script editor i written a code to populate VIEW_OUTPUT.

VIEW_OUTPUT = SELECT * FROM "_SYS_BIC". "Calculation_Views/CALV_2" ;

But i gives error.

Could not execute VIEW_OUTPUT = SELECT * FROM "_SYS_BIC". "Calculation_Views/CALV_2"' in 234 ms 95 µs .

SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near "VIEW_OUTPUT": line 1 col 1 (at pos 1) .



please correct me if, I have understood the table variable and does, I am using it in correct way.

or this can be used only in procedure only.

Regards

Pavneet Rana