[dba-SQLServer] Deletion based on Compound Distinct Selection

Stuart McLachlan stuart at lexacorp.com.pg
Thu Sep 23 17:57:10 CDT 2004


On 23 Sep 2004 at 14:34, Ron Moore wrote:

> 
> WHERE COLUMN1,COLUMN2 IN (
> 
>                         SELECT DISTINCT COLUMN1,COLUMN2
> 

You can only use one value for an "In". You can prossibly concatentate the 
two values. If they are strings, try something like 

Where (Column1 + Column2) In 
    Select Distinct  Column1 + Column2.....

If numeric, you will probably need to convert them to strings first.




-- 
Stuart





More information about the dba-SQLServer mailing list