Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Insert query?

Author  Topic 

asm
Posting Yak Master

140 Posts

Posted - 2007-04-18 : 05:29:01

Hi

I want to create a temporary table from a select statement
but sql server 2005 give error - invalid object name?
like:

INSERT INTO #TempTable (SELECT f.code,c.name FROM FORMNAMEMASTER f inner join formname c on f.code=c.code)


Pls guide how to do this...

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-18 : 05:37:55
[code]SELECT f.code,c.name into #TempTable
From FORMNAMEMASTER f inner join formname c
on f.code=c.code[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -