stressfreewebs
asked on
Migration to MSSQL - Concatenation in Update Statement
I am migrating a database from access to MSSQL, and updating the website coding as I go. I had an update statement as follows:
The update of cCreditNotes is supposed to add the entered values to the beginning of the existing data for that field. However, I get the following error:
How can I achieve the same result as I had with Access in MSSQL?
Thank you
UPDATE Customers SET cCredit = cCredit+"&Request.form("credit")&", cCreditNotes = '"&DATE()&"-"&Request.form("credit")&"-"&why&";"&cCreditNotes WHERE cId = "& Request.form("cust") &"
The update of cCreditNotes is supposed to add the entered values to the beginning of the existing data for that field. However, I get the following error:
The data types varchar and nvarchar(max) are incompatible in the '&' operator.
How can I achieve the same result as I had with Access in MSSQL?
Thank you
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER