Select into [message #247804] |
Wed, 27 June 2007 04:59 |
ataufique
Messages: 79 Registered: November 2006
|
Member |
|
|
hi..
I am having a problem as below while coding in PRO*C
int vcount;
.....
....
EXEC SQL select count(*) into :vcount from tab ;
output comes vcount=250
now if i change the table name as dynamic.
int vcount;
char qrystmt[500];
char vtname[30];
...
...
qrystmt[0] = '\0';
vtname[0] = '\0';
strcpy(vtname,"tab");
sprintf(qrystmt,"select count(*) into :vcount from %s ",vtname);
EXEC SQL EXECUTE IMMEDIATE :qrystmt;
output comes vcount=0;
does anyone have idea why this is returning 0(zero)
|
|
|
|
|
|
|