Solved

Sybase Update Image Columns

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

How do we balance the user experience (UX) with reasonable security measures? It can be done, if you keep these fundamentals in mind.
SEO can be a real minefield to navigate, but there are three simple ways to up your SEO game just be re-assessing your content output.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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