Incorrect Syntax error

  • mike.lee 82031

    Newbie

    Points: 2

    Hello,

    I am new to this forum and SQL. I am trying to send test data to a stored procedure using LabView
    Here is the command
    DECLARE @passfail int
    EXEC [dbo].[SP_UpdateBuildStatus]  @order =00999777,@line = 012,@Status = 0,@mfgSN = '98765432',@Serialnumber = '5678910',@CustSN = '23456',@PCBA = '12345678',@Readingunits = '4 - Gallons',@DisplayMode = '0 - AMR',@AMR_Digits = '* 8 7 6 5 4 3 2 1',@PulseOutput = '* * * * * * * * *',@CustomerCorrection = '00.0',@Billing = '0000099x10E0 Gal',@MeterRangeR = '(0) 1 1/2 or 2"',@VolumePerPulse_R = '0.519058x 100 ml',@FactoryCorrection = '10.0',@Firmware = '01,B7',@RegisterVersion = 'R1.24,OMNI-01,B7.3.10',@SealDate = '3/28/2019 8:10:27 AM',@RegDateTime = '8:10 AM 3/28/2019',@OperatorID = 'Sensus-Xylem',@ProgStationID = 'SENSUS-XYLEM-PC',@ProgDateTime = '3/28/2019 8:10:27 AM',@flow1 = 11.0,@flow2 = 11.0,@flow3 = 11.0,@flow4 = 0.0,@flow5 = 0.0,@flow6 = 0.0,@flow7 = 0.0,@flow8 = 0.0,@flow9 = 0.0,@flow10 = 0.0,@VolumePerPulse_A = '',@Reprogrammed = '',@HEX_R = '',@SupplierRegisterID = '',@BeginTime = '',@EndTime = '',@LCD = '',@passfail = '',

    I keep getting this error in labview and in server management studio.

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near ','.

    Thank you

  • Sue_H

    SSC Guru

    Points: 89707

    mike.lee 82031 - Thursday, March 28, 2019 6:46 AM

    Hello,

    I am new to this forum and SQL. I am trying to send test data to a stored procedure using LabView
    Here is the command
    DECLARE @passfail int
    EXEC [dbo].[SP_UpdateBuildStatus]  @order =00999777,@line = 012,@Status = 0,@mfgSN = '98765432',@Serialnumber = '5678910',@CustSN = '23456',@PCBA = '12345678',@Readingunits = '4 - Gallons',@DisplayMode = '0 - AMR',@AMR_Digits = '* 8 7 6 5 4 3 2 1',@PulseOutput = '* * * * * * * * *',@CustomerCorrection = '00.0',@Billing = '0000099x10E0 Gal',@MeterRangeR = '(0) 1 1/2 or 2"',@VolumePerPulse_R = '0.519058x 100 ml',@FactoryCorrection = '10.0',@Firmware = '01,B7',@RegisterVersion = 'R1.24,OMNI-01,B7.3.10',@SealDate = '3/28/2019 8:10:27 AM',@RegDateTime = '8:10 AM 3/28/2019',@OperatorID = 'Sensus-Xylem',@ProgStationID = 'SENSUS-XYLEM-PC',@ProgDateTime = '3/28/2019 8:10:27 AM',@flow1 = 11.0,@flow2 = 11.0,@flow3 = 11.0,@flow4 = 0.0,@flow5 = 0.0,@flow6 = 0.0,@flow7 = 0.0,@flow8 = 0.0,@flow9 = 0.0,@flow10 = 0.0,@VolumePerPulse_A = '',@Reprogrammed = '',@HEX_R = '',@SupplierRegisterID = '',@BeginTime = '',@EndTime = '',@LCD = '',@passfail = '',

    I keep getting this error in labview and in server management studio.

    Msg 102, Level 15, State 1, Line 2

    Incorrect syntax near ','.

    Thank you

    The error is for the comma at the end: @passfail = '',
    Remove that comma to correct that particular error

    Sue

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply