[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

how do i concatenate two fields of "image" datatype

Posted on 2003-11-04
7
Medium Priority
?
729 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
7 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 400 total points
ID: 9689817
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
ID: 9704526
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
ID: 9704877
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
ID: 9704881
There are some examples in the link that I specified above.
0
 
LVL 2

Expert Comment

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


Cheers,
Mak
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

656 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