Solved

BCP and Triggers

Posted on 2002-06-21
3
1,198 Views
Last Modified: 2008-03-04
Hello All,
  The Scenario:  Two tables, A and B.  One trigger T, a row inserted into table A will get the trigger T to fire to automatically insert some values into B.  I have no trouble getting the trigger to fire when performing an SQL to insert something into table A.  The problem is with BCP.  Trigger never fired when I loaded data into table A via the BCP utility.  Is this something that Sybase support or am I out of luck?

Also, in Oracle, triggers can be fired after or before a transaction is taken place.  Can I do the same thing in Sybase and how?

Thanks.
0
Comment
Question by:johnchan2000
3 Comments
 

Accepted Solution

by:
sunpatil earned 100 total points
Comment Utility
In sybase when u do bcp triggers don't get fired.
In sybase there is no before or after trigger concept.

regards

sunpatil
0
 
LVL 5

Expert Comment

by:amitpagarwal
Comment Utility
it is actually simple to achieve.

1. bcp in the data into a different table with same schema ( say XY)
2. then insert into the actual table
insert into maintable select * from XY

This will fire the triggers.

Thanks.
0
 
LVL 1

Author Comment

by:johnchan2000
Comment Utility
sunpatil answered both of my questions and amitpagarwal gave me an idea on how to get around the problem.  Both gave good and acceptable answers.  sunpatil gets the points since he gave the answers first.

Thanks folks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

7 Experts available now in Live!

Get 1:1 Help Now