Click here to Skip to main content
15,885,216 members
Home / Discussions / Database
   

Database

 
Questioninsert trigger Pin
Mr.Kode1-Jun-08 21:10
Mr.Kode1-Jun-08 21:10 
AnswerRe: insert trigger Pin
Ashfield1-Jun-08 22:07
Ashfield1-Jun-08 22:07 
GeneralRe: insert trigger Pin
Mr.Kode1-Jun-08 22:47
Mr.Kode1-Jun-08 22:47 
GeneralRe: insert trigger Pin
Ashfield1-Jun-08 23:20
Ashfield1-Jun-08 23:20 
GeneralRe: insert trigger Pin
Mr.Kode1-Jun-08 23:46
Mr.Kode1-Jun-08 23:46 
GeneralRe: insert trigger Pin
Ashfield1-Jun-08 23:59
Ashfield1-Jun-08 23:59 
AnswerRe: insert trigger Pin
Alsvha2-Jun-08 0:11
Alsvha2-Jun-08 0:11 
GeneralRe: insert trigger Pin
Mr.Kode2-Jun-08 0:56
Mr.Kode2-Jun-08 0:56 
it succeeded
but the insert value affected all rows i want it to affect 1 row only (new row)

hers is trigger syntax

create trigger InsertInvoice on dbo.Invoice_Summary
for insert
As
begin
insert into Invoice_details.Invoice_num select Invoice_num from Inserted
end
go

example :
insert into invoice_summary (P_name) values ('N1')
results:
the row insert to invoice_summary with Invoice_num 80

problem :
all invoice numbers in the invoice_details(invoice_num) is 80

should 1 row only added with that value

regards
GeneralRe: insert trigger Pin
Ashfield2-Jun-08 1:16
Ashfield2-Jun-08 1:16 
GeneralRe: insert trigger Pin
Mr.Kode2-Jun-08 2:49
Mr.Kode2-Jun-08 2:49 
Question[Message Deleted] Pin
snowblindzz1-Jun-08 20:55
snowblindzz1-Jun-08 20:55 
AnswerRe: MS SQL SERVER PERFORMANCE OPTIMIZATION Pin
Ashfield1-Jun-08 22:09
Ashfield1-Jun-08 22:09 
QuestionPermissions [modified] -- [update] Never mind, solved Pin
Mustafa Ismail Mustafa1-Jun-08 12:11
Mustafa Ismail Mustafa1-Jun-08 12:11 
AnswerRe: Permissions Pin
User 17164921-Jun-08 12:20
professionalUser 17164921-Jun-08 12:20 
GeneralRe: Permissions Pin
Mustafa Ismail Mustafa1-Jun-08 12:51
Mustafa Ismail Mustafa1-Jun-08 12:51 
QuestionUpdate+Increment else Insert Pin
Michael P. Scherer1-Jun-08 5:11
Michael P. Scherer1-Jun-08 5:11 
AnswerRe: Update+Increment else Insert Pin
Hesham Amin1-Jun-08 12:20
Hesham Amin1-Jun-08 12:20 
Questiondrop mergearticle Pin
am2h31-May-08 23:50
am2h31-May-08 23:50 
AnswerRe: drop mergearticle Pin
Alsvha1-Jun-08 0:33
Alsvha1-Jun-08 0:33 
QuestionRe: drop mergearticle Pin
am2h1-Jun-08 0:54
am2h1-Jun-08 0:54 
QuestionQuery for this pricing model Pin
ChrisFarrugia31-May-08 22:23
ChrisFarrugia31-May-08 22:23 
AnswerRe: Query for this pricing model Pin
Christian Graus1-Jun-08 4:14
protectorChristian Graus1-Jun-08 4:14 
Questionerror 26 in visual studio 2005 (sql application) Pin
bapu288931-May-08 7:23
bapu288931-May-08 7:23 
Question{"Incorrect syntax near the keyword 'TRIGGER'."} Pin
Member 400849230-May-08 22:19
Member 400849230-May-08 22:19 
AnswerRe: {"Incorrect syntax near the keyword 'TRIGGER'."} Pin
Colin Angus Mackay31-May-08 7:20
Colin Angus Mackay31-May-08 7:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.