Solved

Sybase Update Image Columns

Posted on 2012-03-21
3
714 Views
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.

Thanks
0
Comment
Question by:stuntman2625
[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
  • 2
3 Comments
 

Author Comment

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

Accepted Solution

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

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

Author Closing Comment

by:stuntman2625
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!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

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

Here's how to start interacting with our community through Post.
In this blog we highlight approaches to managed security as a service.  We also look into ConnectWise’s value in aiding MSPs’ security management and indicate why critical alerting is a necessary integration.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

707 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