Posted: Fri Apr 06, 2007 9:38 pm Post subject: Dynamic Datasource name
Acolyte
Joined: 26 Jun 2001 Posts: 55
In my message flow i am using database insert statement as follow..
SELECT COUNT(*) FROM Database.DBDNS.DBSCHEMA.EMPLOYEE AS X WHERE(X.A= X.B);
when I use the above statement every thing is is working fine. Iam trying to get te DBDNS and DBSCHEMA from property file to retrive dynamically. But getting error to connect database.. Pl find the below ESQL statements which is not working correctly.
Declare dbDNS_values char;
declare DBSchema_value char;
SET dbDNS_values =get this values from prop file(DBDNS)
SET DBSchema_value= get this values from prop file(DBSCHEMA)
SELECT COUNT(*) FROM Database.{dbDNS_values}.{DBSchema_value}.EMPLOYEE AS X WHERE(X.A= X.B);
But getting database exception as below..
[IBM][CLI Driver][DB2/SUN64] SQL0204N "DBDNS.DBSCHEMA.EPC" is an undefined name. SQLSTATE=42704
please let me know how to use the ESQL statement to get the values dynamcially and which will be the same as the first sql statement
Posted: Sat Apr 07, 2007 1:19 am Post subject: Re: Dynamic Datasource name
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
jagan wrote:
In my message flow i am using database insert statement as follow..
SELECT COUNT(*) FROM Database.DBDNS.DBSCHEMA.EMPLOYEE AS X WHERE(X.A= X.B);
when I use the above statement every thing is is working fine. Iam trying to get te DBDNS and DBSCHEMA from property file to retrive dynamically. But getting error to connect database.. Pl find the below ESQL statements which is not working correctly.
Declare dbDNS_values char;
declare DBSchema_value char;
SET dbDNS_values =get this values from prop file(DBDNS)
SET DBSchema_value= get this values from prop file(DBSCHEMA)
SELECT COUNT(*) FROM Database.{dbDNS_values}.{DBSchema_value}.EMPLOYEE AS X WHERE(X.A= X.B);
But getting database exception as below..
[IBM][CLI Driver][DB2/SUN64] SQL0204N "DBDNS.DBSCHEMA.EPC" is an undefined name. SQLSTATE=42704
please let me know how to use the ESQL statement to get the values dynamcially and which will be the same as the first sql statement
What is EPC here ?
Is is table name ?
I can not see it in your select ?
Is it part of DBSchema_value ( red from property file ) ?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum