how do i concatenate two fields of "image" datatype

hi! we have sybase (ASE/ 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
Who is Participating?
namasi_navaretnamConnect With a Mentor Commented:
You cannot issue distinct or group by statements on image datatypes.
You will need to use writetext function to deal with image datatype.

See example,;pt=28254?target=%25N%15_28709_START_RESTART_N%25;__prev_hit__=28314;__next_hit__=28756;DwebQuery=writetext

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.

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.
you can't concatenate image data type, however as BRET suggested you can use WRITETEXT

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.