Click here to Skip to main content
15,890,512 members
Home / Discussions / Database
   

Database

 
AnswerRe: Hi need help for ebook Pin
Blue_Boy21-Sep-07 4:59
Blue_Boy21-Sep-07 4:59 
GeneralRe: Hi need help for ebook Pin
Colin Angus Mackay21-Sep-07 5:06
Colin Angus Mackay21-Sep-07 5:06 
GeneralRe: Hi need help for ebook Pin
Blue_Boy21-Sep-07 5:18
Blue_Boy21-Sep-07 5:18 
GeneralRe: Hi need help for ebook Pin
Colin Angus Mackay21-Sep-07 5:34
Colin Angus Mackay21-Sep-07 5:34 
GeneralRe: Hi need help for ebook Pin
Blue_Boy23-Sep-07 20:43
Blue_Boy23-Sep-07 20:43 
AnswerRe: Hi need help for ebook Pin
Vasudevan Deepak Kumar21-Sep-07 5:08
Vasudevan Deepak Kumar21-Sep-07 5:08 
QuestionSQL Triggers (Before) [modified] Pin
Amit Kumar G21-Sep-07 0:44
Amit Kumar G21-Sep-07 0:44 
AnswerRe: SQL Triggers (Before) Pin
Pete O'Hanlon21-Sep-07 0:55
mvePete O'Hanlon21-Sep-07 0:55 
There is - it's called an instead of trigger and works by defining a trigger on a view which matches the table structure. What happens is you insert into the view which runs the trigger and then depending on your result, inserts into the appropriate table. From memory, it would look something like this:
create trigger MyTableInsertCheck
on MyView
instead of insert
as
begin
select @count = count(1) from mytable m inner join inserted i on m.keyfield = i.keyfield
if @count = 0
begin
  insert name, keyfield into mytable
  select name, keyfield from myview
end
end


Deja View - the feeling that you've seen this post before.

GeneralRe: SQL Triggers (Before) Pin
Amit Kumar G21-Sep-07 1:06
Amit Kumar G21-Sep-07 1:06 
GeneralRe: SQL Triggers (Before) Pin
Pete O'Hanlon21-Sep-07 1:33
mvePete O'Hanlon21-Sep-07 1:33 
GeneralRe: SQL Triggers (Before) Pin
Amit Kumar G21-Sep-07 1:54
Amit Kumar G21-Sep-07 1:54 
Questionselect dates between '2007-01-01' and '2007-01-09' Pin
anderslundsgard21-Sep-07 0:31
anderslundsgard21-Sep-07 0:31 
AnswerRe: select dates between '2007-01-01' and '2007-01-09' Pin
Pete O'Hanlon21-Sep-07 0:46
mvePete O'Hanlon21-Sep-07 0:46 
GeneralRe: select dates between '2007-01-01' and '2007-01-09' Pin
anderslundsgard21-Sep-07 1:39
anderslundsgard21-Sep-07 1:39 
GeneralRe: select dates between '2007-01-01' and '2007-01-09' Pin
Pete O'Hanlon21-Sep-07 2:08
mvePete O'Hanlon21-Sep-07 2:08 
QuestionCan SQL Server 2000 and SQL Server Express co-exist? Pin
ChandraRam20-Sep-07 23:56
ChandraRam20-Sep-07 23:56 
AnswerRe: Can SQL Server 2000 and SQL Server Express co-exist? Pin
Christian Graus21-Sep-07 0:42
protectorChristian Graus21-Sep-07 0:42 
GeneralRe: Can SQL Server 2000 and SQL Server Express co-exist? Pin
Vasudevan Deepak Kumar21-Sep-07 5:06
Vasudevan Deepak Kumar21-Sep-07 5:06 
GeneralRe: Can SQL Server 2000 and SQL Server Express co-exist? Pin
ChandraRam21-Sep-07 8:27
ChandraRam21-Sep-07 8:27 
AnswerRe: Can SQL Server 2000 and SQL Server Express co-exist? Pin
Paul Conrad23-Sep-07 6:45
professionalPaul Conrad23-Sep-07 6:45 
GeneralRe: Can SQL Server 2000 and SQL Server Express co-exist? Pin
ChandraRam23-Sep-07 18:30
ChandraRam23-Sep-07 18:30 
Questionconnection with sql server 2005 Pin
IamAmit20-Sep-07 21:04
IamAmit20-Sep-07 21:04 
QuestionHi answer the question about stored procedure Pin
Senthil S20-Sep-07 19:49
Senthil S20-Sep-07 19:49 
AnswerRe: Hi answer the question about stored procedure Pin
Giorgi Dalakishvili20-Sep-07 20:57
mentorGiorgi Dalakishvili20-Sep-07 20:57 
GeneralRe: Hi answer the question about stored procedure Pin
Senthil S20-Sep-07 21:23
Senthil S20-Sep-07 21:23 

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.