Solved

SQL - Need to create a temporay table

Posted on 2007-12-05
2
163 Views
Last Modified: 2010-04-21
I'm working in ColdFuison and i need to create a temporary MS SQL 2000 table.
<cfquery name="createTempTable" datasource="#dbname#" username="#dbuser#"passsword="#dbpw#">
CREATE TABLE #tmp_report_table
(name      VARCHAR(30),
id            int(4),
level      int(4)
)
</cfquery>

What i'm i doing wrong?
0
Comment
Question by:Wirt
2 Comments
 
LVL 23

Accepted Solution

by:
Ashish Patel earned 500 total points
ID: 20412620
#temp tables are will just exists untill your current connection state or execution and they get dropped as soon as your execution scope is over. So, its good if you create a table without # prefix in tempdb database for your use.
0
 

Author Closing Comment

by:Wirt
ID: 31412880
Thanks
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question