Hi bobyjose,<br><br>I think your problem will be solved if you you use join statement to eliminate the rows that voilating referential<br>integrity.<br><br>If insert is into same table which is having trigger,then <br>join statement will not useful.but if if you are inserting into another we can...
Hi,<br>There is no cascade delete option in sqlserver . we have to handle it with triggers. Even the foriegnkey relation has to maintained using trigger rather than using foriegn constraint because when i had written a trigger for cascade delete i found that forien key is getting fired...
Hi,<br><br> Take out the total ---<br>... WHERE (dbo.tblItemNumber.itemnumberlistID = @pItemNumberListID OR<br>dbo.tblItemNumber.itemnumberlistID IS NULL)<br>--- condition from your selct statement ,because you want select row irrespective of whether it is null,matching or not...
Hi,<br>I tried to apply<br>2)create table referinteger(a int references integer(a, b))<br>after creating <br>1)create table integer(a int,b int,primary key(a,b)) <br>i am getting an below error<br><br>Server: Msg 8140, Level 16, State 1, Line 1<br>More than one key specified in column level...
Hi,<br><br>It is not possible to reference a part of composite primary key.because a foreign key can created only if referenced column is unique or a primary key.<br>so if you want to reference a part of composite key ,you should have unique constraint on it or you have to reference whole part...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.