?
Solved

Query Syntax not working

Posted on 2011-09-14
5
Medium Priority
?
314 Views
Last Modified: 2012-05-12
Hi,

I am trying to copy data from one SQL 2005 db server table to another but no luck.  Please tell me what I am doing wrong.

Inset Query
INSERT INTO [AUTOCAD].[GP_0009].[GP_REVISION]
                      (EMPL, GP_SCHEDULE, YEAR, PERIOD, REVISION, SIGN, SIGN, FL, APP, APD, MB, RW, TIME, NOTES)

SELECT     EMPL, GP_SCHEDULE, YEAR, PERIOD, REVISION, SIGN, SIGN, FL, APP, APD, MB, RW, TIME, NOTES

FROM         [AUTOCAD].[dbo].[GP_REVISION_TEST]


Error
Msg 40002, Level 16, State 1, Procedure GP_REVISION_INSTRIG, Line 36
NOT IN GP for child GP_REVISION
Msg 3609, Level 16, State 1, Line 1
The transaction ended in the trigger. The batch has been aborted.


0
Comment
Question by:cesemj
[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
  • 2
  • 2
5 Comments
 
LVL 57

Expert Comment

by:HainKurt
ID: 36538625
you have a trigger on [AUTOCAD].[GP_0009].[GP_REVISION] which causes some errors...
0
 
LVL 57

Accepted Solution

by:
HainKurt earned 1000 total points
ID: 36538631
nothing wrong on the query.... either disable/delete the trigger or try to understand the logic in trigger and identify the offensive record and filter them out in your insert/select query...
0
 
LVL 34

Assisted Solution

by:Norie
Norie earned 1000 total points
ID: 36538655
Do you know if there is a procedure called GP_REVISION_INSTRIG?

That's appears to be triggered by your query, or something in the query.

It's probably the INSERT that's doing that.

Pretty hard to tell what the specific problem is without knowing more.

You might be able to disable the trigger causing the error but that might have other implicationa.
0
 

Author Comment

by:cesemj
ID: 36538759
ok I will try to understand the logic in trigger  and will let you know what happens.
0
 

Author Closing Comment

by:cesemj
ID: 36549718
Thank you again.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

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