Question

  Asked: Apr 28 2005   9:44 AM GMT
  Asked by: sbkhole


Inserting data into a vargraphic data type field


DataCenter, Data center operations, IT architecture, Application software, Operating system platforms, Services, Tech support, Help Desk, Third-party services, Vendor support, Hardware, Database Management Systems, DB2, DB2 Administration, Migration, Modeling, DB2 Everyplace, UDB for iSeries/i5, Development


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.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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
  • AddThis Social Bookmark Button

Browse more Questions and Answers on DataCenter, CIO and Development.

Looking for relevant DataCenter Whitepapers? Visit the SearchDataCenter.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register