Avatar of SAKETHREDDY
SAKETHREDDY asked on

APOSTROPHE Insertion Error in DB2

Hi ,
I am getting error while inserting a comments.
My table description is :
CREATE TABLE TEST1.EMP
(
NAME VARCHAR(20),
COMMENT VARCHAR(255)
) IN TESTDB.TESTTSP;

Now iam trying to insert a record like below

INSERT INTO TEST1.EMP (NAME,COMMENT) VALUES ('JOHN','Validate  JOHN'S Details')
 
DB21034E  The command was processed as an SQL statement because it was not a
valid Command Line Processor command.  During SQL processing it returned:
SQL0104N  An unexpected token "S" was found following "".  Expected tokens may
include:  "MICROSECONDS MICROSECOND SECONDS SECOND MINUTES MINUTE HOURS".  
SQLSTATE=42601

kindly help me how to insert this record

I also tested like below

INSERT INTO TEST1.EMP (NAME,COMMENT) VALUES ('JOHN',"Validate  JOHN'S Details")

SQL0206N  "Validate  JOHN'S Details" is not valid in the context where it is used.

DB2

Avatar of undefined
Last Comment
hielo

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
hielo

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
hielo

Can you please justify the grade? It seems inappropriate.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck