Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

BCP and Triggers

Posted on 2002-06-21
3
Medium Priority
?
1,280 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
[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
3 Comments
 

Accepted Solution

by:
sunpatil earned 400 total points
ID: 7100139
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
ID: 7102723
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
ID: 7104216
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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

WooCommerce is becoming the most powerful e-commerce plugin for Wordpress. And why not. The platform comprises of numerous core plugins that may come in handy, powerful options to make your website development task much easier.
This week I attended a Startup Week Chattanooga talk on Gender Diversity in Technology. Check out what I learned.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

609 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