tags:

views:

126

answers:

1

Hi, Im working with Sybase central - Adaptive Server Anywhere 9 and I want some examples in the use of de tempDB.

How , for example can I insert some records in a temporary table ? I tried for example: select * into TempDB.dba.#testing from testTable

but I got the followiing error: Syntax error near '.' on line 1

A: 

There are two sets of temp tables and you have mixed them up

1) Session related there are access as #table ie

select * into #testing from testTable

This lasts as long as your connection

2) tables in tempdb. These persist until the server gets rebooted.

select * into TempDB.testing from testTable

See sybase docs for more info ASE

Mark
select * into TempDB.testing from testTable works ! :) but the table testing doesnt exsist it says. I thought that it would create it automatically .
Sjemmie
It should do - what is the full code you tried
Mark
I think I made a typo try TempDB..testing
Mark
unfortunately,i get the following error again: Syntax error near '.' on line 1
Sjemmie
What ius the code you have?
Mark
Never mind mark, insert into TempDB.testing(select * from table) also works, thk u very much for the help !!
Sjemmie
Ah insert into TempDB.testing(select * from table) works if the table already exists select into works if it does not exist
Mark