Sybase Update Image Columns

Posted on 2012-03-21
Medium Priority
Last Modified: 2012-03-21
We have an urgent problem that we need to resolve and our Sybase experience is limited.

Table structures are as follows:

Table T1:
C1 numeric(18)
C2 image
C3 int
C4 varchar

Table T2:
C1 numeric(18)
C2 image

Sequence of events are as follows:

1. Application A inserts the following record into T1 (1,null,5,'junk')
2. Application B inserts the following record into T2 (1,<an jpeg image>)
3. After step #2 happens, we need a trigger on T2 to fire that will UPDATE T1.C2 with the contents of T2.C2.  We have no issues getting this to work with numeric or varchar columns, but we haven't had any luck getting it to work for the image columns.

Any help would be greatly appreciated.

Question by:stuntman2625
  • 2

Author Comment

ID: 37748796
I should also add we're using Sybase ASE 15.0.3
LVL 13

Accepted Solution

alpmoon earned 2000 total points
ID: 37749139
Have you tried something like below?

create trigger trig1 on T2 for insert
  update T1
        set T1.C2 = T2.C2
     from T2
   where T1.C1 = T2.C1

Author Closing Comment

ID: 37749522
Actually, I just found out my problems were as a result of using some Oracle specific syntax.  But your post led me down a different path which eventually solved my problem.  Thanks!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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.

Join & Write a Comment

Salesforce partner relationship management can help you build trust and streamline interactions with partners.
This article describes and provides a custom-made tool I wrote to give businesses a means of identifying commercial music content, without having to expend too much effort. Business recordings are easily identified from possibly illegal music files …
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…

619 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