Home Forums SQL Server 7,2000 T-SQL Concatenate variables... What am I missing?! RE: Concatenate variables... What am I missing?!

  • Plateau (3/6/2013)


    ChrisM@Work (3/6/2013)


    You have single quoted a variable, making it a string-type constant: '@Date_Last_Payment'

    Hi Chris,

    I have temporarily changed it to a varchar - in the input parameters bit however I still get the following error

    Server: Msg 170, Level 15, State 1, Procedure STP_Agent_upload, Line 92

    [Microsoft][ODBC SQL Server Driver][SQL Server]Line 92: Incorrect syntax near ' Reason: there is no transaction that matches the policy number, agent and transaction date specified.'.

    Thanks

    Have you removed the single quotes from around the variable - everywhere it appears in the sproc?

    “Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.” - Gail Shaw

    For fast, accurate and documented assistance in answering your questions, please read this article.
    Understanding and using APPLY, (I) and (II) Paul White
    Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden