Author |
Message
|
madi |
Posted: Thu Oct 12, 2006 11:17 am Post subject: dynamic table name |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi guys
can somebody tell me whats wrong with this statement
Quote: |
SET v_CachedTable.Data[] = (SELECT * FROM Database.{v_Schema}.{v_TableName}) |
i know we can use the {} in v6 but it is throwing this error
Quote: |
DatabaseException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbOdbc.cpp
Line = 355
Function = ImbOdbcHandle::checkRcInner
Type =
Name =
Label =
Catalog = BIPv600
Severity = 3
Number = 2322
Text = Child SQL exception
Insert
Insert
Insert
Type = 5
Text = [IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token ".ENVCODE, .USERID, .PASSWORD, .INVATPCNT, .AUTHSERV, ." was found following "SELECT ". Expected tokens may include: "<space>". SQLSTATE=42601 |
appreciate your help
--madi |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 12, 2006 11:21 am Post subject: Re: dynamic table name |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Code: |
SET v_CachedTable.Data[] = (SELECT T.* FROM Database.{v_Schema}.{v_TableName} AS T) |
Basic ESQL select!
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
madi |
Posted: Thu Oct 12, 2006 11:25 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
the above statement is working if i replace the {v_TableName} with the actual table name!!!
--madi |
|
Back to top |
|
 |
madi |
Posted: Thu Oct 12, 2006 11:41 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
jeff: i used the statement u gave and got this new error
Quote: |
DatabaseException
File = F:\\build\\S600_P\\src\\DataFlowEngine\\ImbOdbc.cpp
Line = 355
Function = ImbOdbcHandle::checkRcInner
Type =
Name =
Label =
Catalog = BIPv600
Severity = 3
Number = 2322
Text = Child SQL exception
Insert
Insert
Insert
Type = 5
Text = [IBM][CLI Driver][DB2/NT] SQL0206N "T.PSWD" is not valid in the context where it is used. SQLSTATE=42703
|
i dont have any idea where its getting the T.PSWD its not in code nor in the database
--madi |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Oct 12, 2006 11:47 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Open a PMR. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Oct 12, 2006 11:50 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
jefflowrey wrote: |
Open a PMR. |
I'm working this exact problem with a customer... when you open the PMR, tell them its the same problem as PMR 90537,L6Q,000. _________________ -wayne |
|
Back to top |
|
 |
madi |
Posted: Thu Oct 12, 2006 12:20 pm Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
well, im actually going ahead of my requirements to make the tablename dynamic
i guess im just gonna make it static
please let us know when you guys solve this
thanks
madi |
|
Back to top |
|
 |
|