• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

Query Syntax not working

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
cesemj
Asked:
cesemj
  • 2
  • 2
2 Solutions
 
HainKurtSr. System AnalystCommented:
you have a trigger on [AUTOCAD].[GP_0009].[GP_REVISION] which causes some errors...
0
 
HainKurtSr. System AnalystCommented:
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
 
NorieCommented:
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
 
cesemjAuthor Commented:
ok I will try to understand the logic in trigger  and will let you know what happens.
0
 
cesemjAuthor Commented:
Thank you again.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now