SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Export from Temptable to CSV
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

robvolk
Most Valuable Yak

USA
15675 Posts

Posted - 11/19/2004 :  15:17:00  Show Profile  Visit robvolk's Homepage  Reply with Quote
Hmmmm. Now you've stumped me. Have you tried dropping and re-creating the stored procedure? Don't ask my why, but I've seen that fix other unexplained errors.
Go to Top of Page

JimL
SQL Slinging Yak Ranger

USA
1535 Posts

Posted - 11/19/2004 :  15:35:35  Show Profile  Visit JimL's Homepage  Reply with Quote
Dropped it recreated it

no F#@%ing luck.

Well back to DTS I guess.

Jim
Users <> Logic
Go to Top of Page

robvolk
Most Valuable Yak

USA
15675 Posts

Posted - 11/19/2004 :  15:41:00  Show Profile  Visit robvolk's Homepage  Reply with Quote
See if getting rid of the DROP TABLE statement fixes it.
Go to Top of Page

JimL
SQL Slinging Yak Ranger

USA
1535 Posts

Posted - 11/19/2004 :  15:57:19  Show Profile  Visit JimL's Homepage  Reply with Quote
Tried that already.

Jim
Users <> Logic
Go to Top of Page

tkizer
Almighty SQL Goddess

USA
36984 Posts

Posted - 11/19/2004 :  16:02:13  Show Profile  Visit tkizer's Homepage  Reply with Quote
Try using the 3 part naming convention for all of your tables in the stored procedure. I wonder if it can't find them because it's looking in master. Just a thought, probably won't work.

Tara
Go to Top of Page

JimL
SQL Slinging Yak Ranger

USA
1535 Posts

Posted - 11/19/2004 :  16:27:15  Show Profile  Visit JimL's Homepage  Reply with Quote
nope same error type.

Jim
Users <> Logic
Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 11/19/2004 :  22:06:11  Show Profile  Reply with Quote
"Even if I change it to a regular table I get the same error type"

Are you creating the table before the SProc runs, or doing an SELECT * INTO dbo.TransPayroll - maybe the table has to exist before the SProc starts

I don't know if this is wrong, but I don't use "dbo." when I use temporary tables:

FROM dbo.#TransPayroll

By the by, I would create the #TransPayroll table and then INSERT INTO it - that way you can put a PK on it, which in my experience makes the thing run a lot faster

Kristen
Go to Top of Page

brench
Starting Member

1 Posts

Posted - 11/24/2004 :  16:08:26  Show Profile  Reply with Quote
You could try using a global temp table (##TransPayroll).
Go to Top of Page

victor_acuña
Starting Member

Peru
2 Posts

Posted - 08/08/2012 :  14:14:01  Show Profile  Reply with Quote
I've tehe same problem with temporary tables when i use bcp.
Go to Top of Page

victor_acuña
Starting Member

Peru
2 Posts

Posted - 08/08/2012 :  16:11:48  Show Profile  Reply with Quote
Hi, I found that temporary tables do not work with the command "bcp".
this is because the tables are removed before the command queryout get them.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000