Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have scenario to develop a query builder based on the database, table parameters.
For example:
vdatabasename, vTablename, vPrimarykey etc and based on these inputs we should be able to develop something which should generate the simple queries.
select count(*) from vdatabasename.vtablename
maybe with a loop on a table
// CONNECT ....
d:
load * inline [
vdatabasename, vTablename, vPrimarykey
db1, tb1, pk1
db2, tb2, pk2
db3, tb3, pk3
];
FOR i=0 TO NoOfRows('d') -1
LET vdb=Peek('vdatabasename', $(i), 'd' );
LET vtb=Peek('vTablename', $(i), 'd' );
TRACE $(vdb);
SET vsql1 = select count(*) from $(vdb).$(vtb) ;
TRACE $(vsql1);
SQL $(vsql1) ;
NEXT
Thank you Grossi!!
I will test and let you know.
Thanks,
Venu
Thanks you Grossi! I was able to achieve the desired functionality with few modifications.