Link to home
Start Free TrialLog in
Avatar of nsujesh
nsujesh

asked on

how do i concatenate two fields of "image" datatype

hi! we have sybase (ASE/11.9.2.5 set on NT4).i have a stored proc where i am retrieving two sets of values from a table and inserting into a temp table. both the values and the destination field are of datatype "image". based on certain conditions, i need to concatenate the two values and populate the destination field. when i try to concatenate, i get an error "the once aggregate operation cannot take a image datatype as an argument". can someone advise how i can concatenate / update fields with "image"?

thx in advance
ASKER CERTIFIED SOLUTION
Avatar of namasi_navaretnam
namasi_navaretnam
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sort of saying the same thing in a different way:

You can't do that in a stored procedure.  If you want to manipulate IMAGE data, your best option is probably to write a simple open client application that can read in the two IMAGE values, concatentate them in a buffer on the client side, then insert the resulting value using writetext.
Bret,

I think writetext can be used with stored procedure. Need to get text pointer and then loop thru to insert.
There are some examples in the link that I specified above.
Avatar of mansoor_a_khan
mansoor_a_khan

you can't concatenate image data type, however as BRET suggested you can use WRITETEXT


Cheers,
Mak