View previous topic :: View next topic
|
Author |
Message |
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
I am trying to create and Run a Dynamic SQL , i will be getting my table and column names only during run time , i have used PREPARE SQL to create the dynamic SQL.
But the problem is its assosistaing my TSO id to the table name instead of the Schema
example its searching for TSOXXX.TABLE NAME and failing in -204.
Please advice if there is any special compilation option to be specified for Dynamic SQLs .
Am using ChangeMan to compile and Promote the code , am new to CHangeman and dynamic Sql , awaiting help
Thanks in Advance |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Vishu,
By default, its taking your TSO ID.
It can be changed by using,
1. SET CURRENT SQLID
or
1. Giving QUALIFIER in the bind statement.
Sushanth |
|
Back to top |
|
|
cvishu
Active User
Joined: 31 Jul 2007 Posts: 136 Location: india
|
|
|
|
Sushanth ,
Thanks for the response , i am not aware of the SET CURRENT SQLID optin, i will give it a try and let you know.
For the second option , yes i am already specyfying the Qualifier in the Bind , but its still not picking up the table , if i use a static SQL its working fine , but when the query is dynamci it fails . |
|
Back to top |
|
|
|