Hello all. Got bit of a long winded question here...........so here we go lol.OK.......ive got data on an Excel spreadsheet. Ive set the spreadsheet up as a linked server and i'm creating a set of insert statements from it by using the following code:SELECT 'INSERT INTO TRAINREC (COURSE_NAME) VALUES ('''+ EMPLOY_REF + ''', '''+ FROM AtriumDD...['Employee Training Records$']For most records this generates a correct insert statement.........for example:INSERT INTO TRAINREC (EMPLOY_REF, COURSE_NAME) VALUES ('153', 'NMA Panel');However.........my problems start when the value for course name is containes an ' character. If it does the insert statement generated is incorrect. For example:INSERT INTO TRAINREC (EMPLOY_REF, COURSE_NAME) VALUES ('139', 'Annual Accounting in Lloyd's Market');can anyone suggest any ideas on how to get round this? Also if i havent explained it clearly enough just let me know and i can try and expand on it.Thanks for reading.