If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > CASTing existing LVARCHAR data to TEXT?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-07-11, 16:10
ljnelson ljnelson is offline
Registered User
 
Join Date: Aug 2010
Posts: 2
Question CASTing existing LVARCHAR data to TEXT?

(I've also asked this question on StackOverflow in case people would rather comment there.)

I have an LVARCHAR(4096) column that, in a perfect world, I would like to change to be a TEXT column.

No ALTER TABLE foo MODIFY bar TEXT statement that I can come up with will do the trick. Informix keeps telling me that I need to create a CAST that can convert the data from LVARCHAR to TEXT. I have read the documentation, and understand what is being asked for, but I have no idea what sort of function to write that would take an LVARCHAR and somehow extract its "textness" out in such a way that it could be returned as TEXT.

So: how can I perform this column alteration?

Best,
Laird
Reply With Quote
Reply

Tags
cast, datatype

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On