September 7, 2005 at 4:10 pm
Is there any differences or issue with the following:
01. Insert INTO base tables directly which are part of a UNION ALL View
02. Insert INTO UNION ALL View with where check clauses
Both will run from QA so both will do the same job.
Jagan
September 7, 2005 at 4:28 pm
I am not able to understand your question
Amit Lohia
September 8, 2005 at 8:56 am
As many have said in the past, posting some actual code examples goes a long way towards helping people understand your question.
Data and DDL are good too when appropriate.
September 8, 2005 at 10:05 am
In the abscene of more information, I am assuming that the question is that for an INSERT statement: what would be better if you have a view that is based on UNION ALL of multiple sets (different/same table (different conditions)...I believe you are asking whether it is better to insert into the base tables that the view comprises of or is it better to do the insert through the view.
Please remember that not all views can be used for DMLs...there are restrictions in multiple table views since the database cannot determine the physical location of the record(s). A way to work around that is by using Instead-Of triggers (look up more on this in BOL).
For your scenario, you should insert directly into the base tables rather than going through the view for doing the inserts.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply