For each #, you will need two ##.  So, you need CREATE TABLE #### for it
to create your temp table.

The easy way to determine is to look at the data dictionary in your
database server.

Use CFDBINFO, for example, if you have CF8.

Mike

-----Original Message-----
From: Robert Rawlins [mailto:[EMAIL PROTECTED] 
Sent: Monday, September 22, 2008 6:12 AM
To: CF-Talk
Subject: Temporary Tables

Guys,

 

I'm looking to run a query which creates a SQL Server temporary table.
This has got me a little confused as the SQL requires to have a # in the
midst of it to create the table.

 

What's the correct syntax for this? Do I use a double ## or a triple
###?

 

For instance, if I have a query like so:

 

      <cfquery name="LOCAL.qCreate" datasource="MyDSN">

            CREATE TABLE ##MessageStaging (....

 

Is that creating a temp table? Of is the ## just an nonexistent value
and its creating a physical table?

 

I'd appreciate your thoughts guys,

 

Robert

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312891
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to