Inserting data into a vargraphic data type field

pts.
Tags:
Application software
Data center operations
Database Management Systems
DataCenter
DB2
DB2 administration
DB2 Everyplace
Development
Hardware
Help Desk
IT architecture
Migration
Modeling
Operating system platforms
Services
Tech support
Third-party services
UDB for iSeries/i5
Vendor support
How to insert data into a vargraphic data type field. I have done the following CREATE TABLE TEST_TABLE (FLD1 VARGRAPHIC(20)) This is done succesfully INSERT INTO TEST_TABLE VALUES('TEST') This gives a SQL error Please let me know how I can acheive it.

Answer Wiki

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

You’ll need to use the vargraphic() function –

insert into test_table values (vargraphic(‘TEST’, 4));

This should convert your text to something the vargraphic column can accept.

Next time report the error you receive, as it’s impossible to read minds.

David Fitzjarrell

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