INSERT INTO query returning "Unclosed quote after character string"

I've tried searching everywhere on the site and in the Microsoft documentation, but I'm stuck with running a query to insert objects into a table. What am I doing wrong to get

"An open quote after the character string 'cate'"

mistake?

Here is the request:

INSERT INTO t_lu_Product ([product_id], [description], [isCompetition], [category], 
                          [subCategory], [brand], [type], [returnability], [capacity]) 
VALUES(200011073, '1.25L PNR CC', 1, 'Cola',
       'Cola Regular', 'Coca-Cola', 'Familiares', 'No Retornable', 1);

      

+2


source to share


1 answer


I am assuming that one of the lines you are trying to insert contains an apostrophe. Depending on how you create your request, you can use parameters or escape the apostrophe:



INSERT INTO t_lu_Product ( ... ) VALUES(... ,'Mother' Cookies',1);

      

+5


source







All Articles