Solved

Sybase Update Image Columns

Posted on 2012-03-21
3
684 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
  • 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SyBase SQL Syntax 4 634
Sybase 15.7 database backup 8 592
Sybase environment variable 1 178
MS SQL 2008 server - system update recommendation 13 94
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

17 Experts available now in Live!

Get 1:1 Help Now