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
 SQL Server Development (2000)
 Error: sqlstate = 37000, Native Error = 170

Author  Topic 

kage19
Starting Member

2 Posts

Posted - 2011-04-26 : 02:16:41
Hi guys! Can you plese help me resolve this error:

SQLState = 37000, Native Error = 170
Incorrect syntax near '', ''.

Here is my code:

bcp "SELECT '\"' + isnull(rtrim(ltrim(code)),' ') + '\"', 
'\"' + isnull(rtrim(ltrim(name)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(address1)),' ') + ' ' + isnull(rtrim(ltrim(address2)),' ') + '\"' as address,
'\"' + isnull(rtrim(ltrim(area)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(type)),' ') + '\"',
'\"\"',
'\"\"',
'\"\"',
'\"\"',
'\"\"',
'\"' + isnull(rtrim(ltrim(cur)),' ') + '\"',
'\"\"',
'\"\"',
'\"\"',
'\"\"',
'\"' + isnull(rtrim(ltrim(flag)),' ') + '\"',
'\"\"',
'\"' + isnull(rtrim(ltrim(limit)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(sdate)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(edate)),' ) + '\"',
'\"' + isnull(rtrim(ltrim(flag2)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(reset)),' ') + '\"',
'\" \"'
FROM table WHERE code = '1'" queryout C:\test.csv -c -T -t,

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2011-04-26 : 03:27:52
maybe it is the very last comma?


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

kage19
Starting Member

2 Posts

Posted - 2011-04-26 : 03:36:35
Nope, my other queries also have a comma in the end
Go to Top of Page
   

- Advertisement -