Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem with Bulk insert and insert trigger

Problem with Bulk insert and insert trigger

Scheduled Pinned Locked Moved Database
databasehelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    www Developerof NET
    wrote on last edited by
    #1

    Hi all, I have a table Adp_Item_Conversion with following fields ConversionID identity, BranchID, Itemcode, BatchNo, LotNo, Date, CTSCode And i need to insert data in this table using a select query on other table as well as some predefined variables because the number of rows to be inserted is not fixed. insert into Adp_Item_Conversion ( BranchID, Itemcode, BatchNo, LotNo, Date, CTSCode ) select @branchID,Adp_master_detail.child_itemcode,@Br_No,@lt_No,@tr_date,@tr_code from Adp_master_detail where Adp_master_detail.Parent_Item=@ParentItemID The problem is I have written an insert trigger on the table. The trigger only writes the last record to the log table. Although i have access to the trigger , i cannot change it now. So i need to rewrite the insert query so as to accommodate the insert as shown above and also the insert should be 1 row at a time. Can i use cursors or is there a other way round????

    When you fail to plan, you are planning to fail.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups