Link to home
Start Free TrialLog in
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.

ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can you please justify the grade? It seems inappropriate.