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
NULL
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'