Function Sequence Error on BCP

Function Sequence Error on BCP

Post by Rob Rei » Tue, 20 Nov 2001 21:19:18

I am using BCP to output some records but when I try to
output a certain amount of records I hit this message.
SQLState = S1010, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]Function
sequence error

I am using a SELECT top x SQL statement and it works fine
until the number I want to output hits 49. I have looked
at the data and it looks ok.

the bcp line is
bcp "SELECT top 49 1 as ''Call Center'', Block, URN,
Start_Dialing, CountryCode as ''Country Code'', CLI,
Agent_ComputerName as ''Agent Computer Name'',
Reason_Code,  abs(datediff
(second,Start_Dialing,Start_Speaking)) as ''Dial
Duration'', abs(datediff
(second,Start_Speaking,End_Speaking)) as ''Talk
Duration'' , Agent_ID, CASE  when Record_Call = -999
then ''DEL''  when Record_Call = 0 then ''OFF'' when
Record_Call <= 0 then ''ON''  else ''OFF'' end as ''Voice
Recording'', Conference_Call as ''Remote Monitor ID'' FROM
activity_log WHERE (cleanup<>1) AND (DATEDIFF(DAY, Stamp,
GETDATE())>10)" queryout c:\Archive_1_19112001_1.txt -t , -
c -SServer -Uuser -Ppsw'


1. "function sequence error" with BCP

I am using BCP's (EXE dated 8/6/2000) 'queryout' keyword to dump the
result set of a stored procedure to a TXT file.  Getting a "function
sequence error" back.  The stored proc runs fine on its own in Query
Analyzer.  My cmd line:

bcp "execute mydbname..myprocname" queryout mainframe.txt -S myservername
-U myid -P mypw -e mainframe.err -c -t"\t"

Any ideas?  Thanks much.

error: SQL State = S1010

2. Would Appreciate Assistance with Optimizing UPDATE

3. 'function sequence error' in BCP

4. DevWizard 2001 BETA Release 2 now available! For VB, COM, ASP, and SQL Developers

5. BCP and Function Sequence Error

6. Delete result from Select?

7. ODBC error:S1010: [Microsoft][ODBC SQL Server Driver]Function sequence error

8. Oracle 8 and changing DB id's

9. Protocol error in TDS stream and Function sequence error in SQL 7.0 SP2

10. ODBC Error - Function sequence error

11. ODBC error: "function sequence error"

12. Rollback Error: Function Sequence Error with Sql Server 6.5 Database

13. MS Access sql error [Function sequence error]