UPDATE LONG VARCHAR

Discussions specific to SQLbase 11.

UPDATE LONG VARCHAR

Postby fakie » Wed Dec 30, 2015 5:06 am

Hallo,

I have a very base question. I'd like to update a LONG VARCHAR column by appending a fixed string to it. sth like:

update table set longcolumn = longcolumn || 'my text'

but I always get an error:

Error: 01632 TYP BLO Invalid long type detected

So how would I do the update?


regards, Marco
fakie
 
Posts: 74
Joined: Mon Jun 11, 2012 11:58 am

Re: UPDATE LONG VARCHAR

Postby mvandine » Wed Jan 06, 2016 11:57 pm

Hmmmm. Not sure how you would do that. I just tried this with SQLTalk:

connect test;
create table test(test1 long varchar, test2 long varchar);
update test set test1 = test1 || test2;

I get the same error and it's pointing to the 'test1' after the = sign. I can do a:

update test set test1 = test2;

Which seems to indicate that for a long varchar you can't do a concatenation even if both column types are longs. Looking at the Language Manual, under the data type of long varchar, I see:

"LONG VARCHAR columns cannot be used in expressions or in most functions."

In the Update statement, the syntax shows that the 'set' can be an expression, but I think that is disallowed for a long varchar.

So, in short, I don't think that this can be done.

Best regards,
Mike Vandine
Gupta Technologies
User avatar
mvandine
 
Posts: 4120
Joined: Wed Feb 14, 2007 4:15 pm
Location: Perth, Western Australia

Re: UPDATE LONG VARCHAR

Postby frevelundfey » Fri Jan 08, 2016 3:45 am

Hi Marco,
in most DBMS you have to fetch Long-data then concatenate it in your program then write it back to the DB.
Regards Thomas
frevelundfey
 
Posts: 172
Joined: Fri May 11, 2012 2:23 am
Location: Munich, Germany


Return to SQLBase 11

Who is online

Users browsing this forum: No registered users and 1 guest