If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Update third table using triggers on save of master detail tables

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-21-11, 01:21
tassadaque tassadaque is offline
Registered User
 
Join Date: Jun 2010
Posts: 9
Update third table using triggers on save of master detail tables

I ve following Master detail tables

Sales (SaleID,CustomerID, SaleDate)
SaleDetails (SDetailID, ProductID,Quanity,Price,SaleID)
I have AccountingTrans tables as Follows

Journals (JID, JDate,SaleID)
JournalDetails (AccID,Dr,Cr)
My Account are linked with Customer and Product. Now i want to use trigger to automatically enter three transaction(in case of two Products in detail entry) in JournalDetails table. I am able to insert Product balances but don't know how to insert Customer (Sum of SKU amounts) entry in journalDeails table

I am using ASP.net mvc with EF to save the invoice
Reply With Quote
Reply

Tags
entity framework, sql, sql server 2008, trigger

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On