Can not figure out this error message

pts.
Tags:
DB2 Universal Database
I am creating a table and tring to insert headings into it but I keep getting this one error and I just can not figure it out. Please help if you can. The first statement is: "create table qtemp/rrlib (hdgs char (3000 ) not null with default" Then my insert statement: "insert into qtemp/rrlib values("cs#200","nm1200","ln3200","cty200","stc200","zip200","art203","ct#203","dat203","opn203") when the insert runs I get this error" sql0206 - column "opn203" not in specified tables. Can anyone see anything that would cause this ? Thank You, Scott Troxell

Answer Wiki

Thanks. We'll let you know when a new response is added.

(1) Note that ‘This is a string’ is a string. On the other hand, “This is a field name” is a field name. Single quotes denote a constant string; double quotes enclose a field name that would not otherwise be legal. So, if you want to insert items into the field, use single quotes. The error message means that it’s looking for a field named opn203, which is the same as “opn203″ and OPN203. Likely, you meant ‘opn203′.

(2) INSERT INTO x VALUES(y, z) means to insert one record into X with values Y and Z into the record’s (exactly) two columns. INSERT INTO x VALUES(y), VALUES(z) means to insert two records, one with the single field value Y, and one with the single field value Z. Note that not all versions of SQL can handle this, and you may have to code INSERT INTO x VALUES(y); INSERT INTO x VALUES(z).

Sheldon Linker (sol@linker.com)
Linker Systems, Inc. (www.linkersystems.com)
800-315-1174 (+1-949-552-1904)

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following