[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Creating temp table in SQL Server
- Subject: Creating temp table in SQL Server
- From: "Shaver, Richard H" <richard.h.shaver@LMCO.COM>
- Date: Tue, 19 Oct 1999 06:24:38 -0700
I can't seem to find the right syntax to create a temporary table in SQL
Server using SQR. SQL Server builds temporary tables when the table name is
preceded by a #. It is simple enough to do within the database using the
native language (i.e. CREATE #TEMP (FIELD TYPE), but when I try to use the
same syntax in SQR I receive the "COUNT field incorrect" error. If I put
brackets around the table name, i.e. CREATE [#TEMP], SQR returns the
"incorrect syntax near [" error. (I got the idea for the brackets from the
SQR Users group page, but it was in regards to Informix.)
I have tried the Create command and the Select * Into command with the same
results.
begin-program
begin-sql
create table #rick (test char(4))
end-sql
end-program
begin-program
begin-sql
select * into [#rick] from srsch
end-sql
end-program
The same SQR syntax creates a permanent table if I remove the # from in
front of the table name, but that sort of defeats the purpose. Any ideas??
tia
Rick Shaver
LM Data Systems
1-360.396.8488