|
-
April 19th, 2011, 10:52 PM
#1
query hints maximum command buffer size of 1023 bytes
Hi All,
I have an error that say's query hints maximum command buffer size of 1023 bytes. I've already researched on the web and found two solutions: first is to create and stored procedure and second is to create a view. Unfortunately I can not apply this two solutions because I'm not allowed to make changes in the database. Is there any other way to solve this problem. Thanks!
-
April 20th, 2011, 12:47 AM
#2
Re: query hints maximum command buffer size of 1023 bytes
Without knowing anything about the query or circumstances - I can only suggest working on fragmenting it into multiple smaller queries.
-
April 20th, 2011, 01:35 AM
#3
Re: query hints maximum command buffer size of 1023 bytes
Here is the query:
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(do)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(country)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(timediff)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(person)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(num)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(curr)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(loc)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(fax)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(email)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(limit)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(cense)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(withof)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(prd)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(amt)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(start)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(end)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(witham)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(rr)),' ') + '\"',
'\"' + isnull(rtrim(ltrim(orf)),' ') + '\"',
FROM table
where code= 'ABC'" queryout C:\fo.csv -c -T -t,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|