Solved

how do i concatenate two fields of "image" datatype

Posted on 2003-11-04
7
655 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:nsujesh
  • 3
7 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 100 total points
Comment Utility
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,

http://sybooks.sybase.com/onlinebooks/group-as/asg1251e/sqlug/@ebt-link;pt=28254?target=%25N%15_28709_START_RESTART_N%25;__prev_hit__=28314;__next_hit__=28756;DwebQuery=writetext

0
 
LVL 10

Expert Comment

by:bret
Comment Utility
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.
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
Comment Utility
Bret,

I think writetext can be used with stored procedure. Need to get text pointer and then loop thru to insert.
0
 
LVL 15

Expert Comment

by:namasi_navaretnam
Comment Utility
There are some examples in the link that I specified above.
0
 
LVL 2

Expert Comment

by:mansoor_a_khan
Comment Utility
you can't concatenate image data type, however as BRET suggested you can use WRITETEXT


Cheers,
Mak
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now