Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Params in CREATE TABLE statement?
Mon, Nov 6 2006 12:17 PMPermanent Link

David Keith
Is it acceptable to use parameters in a CREATE TABLE statement? I would like to do
something like the following:

create table if not exists Tongueram1||Tongueram2||Tongueram3||'\'||Tongueram4||'<FILENAMESUFFIX>'?
I'm getting the following error when I try this:
---------------------------
Error
---------------------------
An error has occurred in the current SQL statement and the error message is:

DBISAM Engine Error # 11949 SQL parsing error - Expected table name but instead found ? in
CREATE TABLE SQL statement at line 6, column 28
---------------------------
OK   
---------------------------

I have to create several tables over and over and over and... well, you get the idea. For
me it's easier to do this in a SQL script, substituting the params with path info etc in
the OnGetParams event.

I realize that I could do this in Delphi code but would prefer to do this in SQL.

Thanks.
Mon, Nov 6 2006 11:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< Is it acceptable to use parameters in a CREATE TABLE statement? I would
like to do something like the following: >>

You can only use parameters in DML statements: SELECT, INSERT, UPDATE, and
DELETE.  They are equivalent to constants, as opposed to identifiers or
simple text.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image