Home Forums SQL Server 2008 SQL Server 2008 - General Concatenate IN TRIGGER two fields into one in this line of the TRIGGER T-SQL?: RE: Concatenate IN TRIGGER two fields into one in this line of the TRIGGER T-SQL?:

  • Tava (11/12/2012)


    briancampbellmcad (11/12/2012)


    Both the PO_Number and HeatTicketNumber are already Varchar as the table datatype... so (?) no need for conversion (?)...

    I ran the code above and now have a SQL error popping up from my ASp.net app:

    String or binary data would be truncated.

    The statement has been terminated.

    Check the datatype size of the VARCHAR columns compared to the PO_Number & HeatTicketNumber? Chances are one of those 2 columns is greater in length then what you have specified. That's what the error you got normally means?

    Thought i would help you as I don't know you're exact skill level. Do a Length check on your data.

    SELECT

    LEN(ColumnName) AS StringLength

    FROM

    TableName

    ORDER BY

    StringLength DESC

    What ever the biggest size it is needs to be less than the specified size on the VARCHAR(X)