The set @ QNN='INSERT INTO HUAWEI (TMNO TM02) VALUES (' AA', '0')
INSERT INTO HUAWEI (TMNO, TM02) VALUES (' CA ', '0') INSERT INTO HUAWEI (TMNO TM02) VALUES (' DA ', '0') '
The exec [HUAWEI_INSERTbatch] @ insertbachsql=@ QNN
How to change, thank you
CodePudding user response:
set @ QNN='INSERT INTO HUAWEI (TMNO TM02) VALUES (' AA', '0')
INSERT INTO HUAWEI (TMNO, TM02) VALUES (' CA ', '0')
INSERT INTO HUAWEI (TMNO, TM02) VALUES (' DA ' ', '0') '
CodePudding user response:
SQL server has two escape characters:'by default, is the border of the string, if the string contains', you must use two' 1 'is the escape character,
Another escape character is "
When SET QUOTED_IDENTIFIER OFF, "is a string boundary, in the string" must use two "said,