November 13, 2017 at 10:50 am
All, I have 26K records which I have to insert into a table. I have built a query using the Excel but I am running into an issue because there are so many lastname which contains single quote like O'Connor etc. How do I take care of this? INSERT INTO TEST (FirstName, LastName) VALUES ('Thomas','L'Ecuyer ');
INSERT INTO TEST (FirstName, LastName) VALUES ('Tyler','O'Connell ');
November 13, 2017 at 10:53 am
Syed Razi - Monday, November 13, 2017 10:50 AMAll, I have 26K records which I have to insert into a table. I have built a query using the Excel but I am running into an issue because there are so many lastname which contains single quote like O'Connor etc. How do I take care of this?INSERT INTO TEST (FirstName, LastName) VALUES ('Thomas','L'Ecuyer ');
INSERT INTO TEST (FirstName, LastName) VALUES ('Tyler','O'Connell ');
Double up the 'internal' quotesINSERT INTO TEST (FirstName, LastName) VALUES ('Thomas','L''Ecuyer ');
INSERT INTO TEST (FirstName, LastName) VALUES ('Tyler','O''Connell ');
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
November 13, 2017 at 11:05 am
Phil Parkin - Monday, November 13, 2017 10:53 AMSyed Razi - Monday, November 13, 2017 10:50 AMAll, I have 26K records which I have to insert into a table. I have built a query using the Excel but I am running into an issue because there are so many lastname which contains single quote like O'Connor etc. How do I take care of this?INSERT INTO TEST (FirstName, LastName) VALUES ('Thomas','L'Ecuyer ');
INSERT INTO TEST (FirstName, LastName) VALUES ('Tyler','O'Connell ');Double up the 'internal' quotes
INSERT INTO TEST (FirstName, LastName) VALUES ('Thomas','L''Ecuyer ');
INSERT INTO TEST (FirstName, LastName) VALUES ('Tyler','O''Connell ');
Thanks!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply