G
Gerry Hickman
Hi,
Is it possible to use a parameter (or expression) in the FROM clause
instead of a hard coded table name? e.g.
PARAMETERS tName Text ( 255 );
SELECT *
FROM tName;
(This would allow the user to supply any table name and the query would
return all data from it).
When I try to do this I get an error saying a "parameter was found where
a table name was expected".
A second similar question; is it possible to do something like this
(assuming I have a table called "table22")
SELECT *
FROM "table" & "22";
Again, I can't get this to work.
I know how to do thid kind of thing with programming, but I'm trying to
learn how to do it with pure SQL.
Is it possible to use a parameter (or expression) in the FROM clause
instead of a hard coded table name? e.g.
PARAMETERS tName Text ( 255 );
SELECT *
FROM tName;
(This would allow the user to supply any table name and the query would
return all data from it).
When I try to do this I get an error saying a "parameter was found where
a table name was expected".
A second similar question; is it possible to do something like this
(assuming I have a table called "table22")
SELECT *
FROM "table" & "22";
Again, I can't get this to work.
I know how to do thid kind of thing with programming, but I'm trying to
learn how to do it with pure SQL.