|
Posted by Erland Sommarskog on 09/22/05 00:29
tom (tomfeldsten@hotmail.com) writes:
>From a list of IDs that are the primary key in one table (i.e. Customer
> Table), I want to make changes in tables that use those IDs as a
> foreign key.
>
> Basically I want to say:
>
> If fk_ID is in list [1,2,3,4,5] then
> do these statements to that record
> End if
>
> Where do I begin?
>
> Thanks for help with this low-level view of SQL programming.
IF EXISTS (SELECT * FROM tbl WRE fk_ID IN (1, 2,3, 4, 5))
Although I'm really certain that I understood exactly what you want to
do, so you maybe you need t clarify.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|