On the plus side, all of your ColdFusion code is completely correct.

I suspect you simply copied and pasted that from some helpfile or website and 
no it is not correct.

Your syntax is, therefore, shot.

The square brackets mean that you have to make a choice (in the case of a 
UNIQUE or CLUSTERED index) or it is optional (in the case of the [NOT])  The 
[,] means that you can repeat this statement if you want more than 1 column in 
the table (which, is useful in a database)

in the case of (columnName(s)) this is where you put the names of your columns 
in the table on which you want to create an index.  The bunch of stuff down the 
bottom of your query looks like an example of different datatypes.

Um, that probably wasn't wholly helpful but let us know what you actually want 
that slab of code to do. (other than halt on the first line)

- James

> -----Original Message-----
> From: Chris Ellem [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 11 January 2005 10:08 AM
> To: CFAussie Mailing List
> Subject: [cfaussie] Create TABLE Syntax for MS SQL 2000
> 
> 
> First time using this function can someone please check my syntax
> 
> Thanks
> 
> ****************
> 
> <CFQUERY NAME="AddTable" DATASOURCE="#APPLICATION.DB#" 
> USERNAME="#APPLICATION.UN#" PASSWORD="#APPLICATION.PW#">
> CREATE TABLE VIPMembers (MemberID int[primary key] [NOT] NULL [,])
> 
> CREATE [unique/clustered] INDEX MemberID ON VIPMembers
> (columnName(s))
> 
> UserID (integer identity), char(20), datetime, money, real,
> double, smalldatetime, smallmoney, city.
> </CFQUERY>
> 
> *******************
> 
> Chris Ellem
> Kaizen Solutions
> [EMAIL PROTECTED]
> 
> ---
> You are currently subscribed to cfaussie as: 
> [EMAIL PROTECTED]
> To unsubscribe send a blank email to 
> [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
> 

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to