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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 i know this sounds stupid

Author  Topic 

BAz
Starting Member

7 Posts

Posted - 2002-01-11 : 06:29:48
I read an article here on how to BULK INSERT, and in that, the author uses the following code:

DECLARE @SQL varchar(2000)
SET @SQL = 'blah, blah, and so on, and so forth...'

I'm using MS visual InterDev to make a couple of ASP pages that execute St'd Procs, but when I try the above code, I get the following:

varchar limited to 255 (and i read somewhere it can be 8000!?),
syntax error near @SQL (in other words, it won't accept the SET command here... I have to use SELECT @SQL = 'blah, blah...)

Anybody have any ideas?

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-01-11 : 06:44:01
Hi

Looks to me like you are using SQL Server 6.5
6.5 can only support 355 characters, 7 and 2000 will go to 8000.



Damian
Go to Top of Page

BAz
Starting Member

7 Posts

Posted - 2002-01-11 : 06:51:55
yeah, I'm using 6.5

isn't the limit 255 ? (maybe a type-o on your part?)

didn't know that was where the problem is at. But now i suspect that that's the reason for more of my problems, 'cos a lot of stuff i read here simply doesn't work for me. like the bcp/bulk insert story. bcp works (sort of) but i believe Bulk insert is 7.0 and higher only, not?

but thanx for the reply, at least i know what the problem is now.

BAz



Edited by - BAz on 01/11/2002 06:52:43
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-01-11 : 07:02:10
sorry, yes a typo. I did mean 255.

Good luck!

Damian
Go to Top of Page
   

- Advertisement -