on 05-29-2020 5:59 PM
I have defined $G_Table_Name as a global variable and then defined the table name through a script.
Upon trying to use it in my SQL transform I am getting syntax error. Following is the query I used:
Select * from Stage_Schema.[$G_Table_Name]
To check if it works like SAP Hana, I also tried the following but all of them give syntax error:
Select * from Stage_Schema.||[$G_Table_Name]
Can anyone point me to the right direction on this?
The first version should create a valid SQL string. All other requirements must be met as well, e.g. the columns returned by the "select *" need to match the defined output schema precisely.
Generally speaking, neither using a SQL Transform as such nor a "select *" in it is advisable. It is a potential time bomb.
One option would be to drop/create a database view in the script where you set table variable and in the dataflow use the view as source. Thus you do not need the SQL Transform any longer and can benefit from all the optimizations BODS is capable of.
http://discoverbi.blogspot.com/2018/05/bods-sql-transform-with-variable.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.