Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mapidea
Posting Yak Master
124 Posts |
Posted - 2010-03-06 : 18:34:48
|
| I have a question on best practises in Triggers.I have a table in which I am improting Order information (Table Name – Data_Imported).Now I want to create a Order in the same database from the imported data.If I create a After Trigger On Insert for (Data_Imported) on the table and get all the inserted data and create a order in Orders table by inserting data.Is this a good practise? I have read that there are performance issues when the trigger executes query on other tables.http://msdn.microsoft.com/en-us/magazine/cc164032.aspx In the last paragraph he says " One situation in which triggers are not efficient is when the trigger must perform queries against other tables."Even if this is a good practice are their any alternate solution. or should I create a Order in Orders table when importing itself rather than using triggers on Data_Imported table.Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-07 : 02:25:25
|
| whats the order info you're importing? are you trying to clone new orders from it?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|