> > Hi,
> >
> > I'm using SQLEXEC to get a list of all tables in a MySQL database:
> >
> >
* setup ODBCC connection here
> > LOCAL lcCursor, lcTable
> > lcCursor = "TABLES_CURSOR"
> > lcTable = "abcdef"
> >
> > TEXT TO m.cSQL NOSHOW
> > SELECT table_name FROM information_schema.tables WHERE table_schema = ( lcTable )
> > ENDTEXT
> >
> > SQLEXEC(gnConnHandle, m.cSQL, m.lcCursor)
> >
> > This will give an error: Unknown column 'lcTable' in 'where clause'
> >
> > If I replace ( lcTable ) with "abcdef" the query runs fine. I tried some variations, like ("&lcTable"), &lcTable, "&lcTable", lcTable and (&lcTable), but without any luck.
> > What is the right syntax to get this query working with a variable for the table_scheme?
> >
> > Regards, Gerrit
> >
> >
Today is only yesterday's tommorrow - Uriah Heep>
>
SELECT table_name FROM information_schema.tables WHERE table_schema = ?lcTable
>
>
There's a fine line between helping and adding to the confusion.>
>
How to create sample dataHi Tore
Thanks for reminding me I overlooked this one. How many times did I use similar code, at least a thousand time!
I guess this was a mondaymorning issue.
Regards, Gerrit
Today is only yesterday's tommorrow - Uriah Heep