Re: FW: sql delete join question [124]
Posted in 2006
Topics: SQL Development & Query Writing
Merge !!
I didn't know it...
It apply perfectly to something i'm working on actually.
Does it only works with IDS 10 ?
J.
Serge Rielau escribi':
> Tomchik, Kate wrote:
>
>>Can we add this as a new feature request?
>
> What's wrong with?
> DELETE FROM T WHERE PK IN (SELECT PK FROM S)> Anyway for those not liking IN or EXISTs a simple extension to MERGE
> would provide salvation:
>
> MERGE INTO T USING S ON T.pk = S.pk
> WHEN MATCHED THEN DELETE
> (http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.sqls.doc/sqls580.htm)
>
> Cheers
> Serge
>
Jean Sagi wrote:
> Merge !!
>
> I didn't know it...
>
> It apply perfectly to something i'm working on actually.
>
> Does it only works with IDS 10 ?
>
>
>
> J.
>
> Serge Rielau escribi':
>> Tomchik, Kate wrote:
>>
>>> Can we add this as a new feature request?
>>
>> What's wrong with?
>> DELETE FROM T WHERE PK IN (SELECT PK FROM S)>> Anyway for those not liking IN or EXISTs a simple extension to MERGE
>> would provide salvation:
>>
>> MERGE INTO T USING S ON T.pk = S.pk
>> WHEN MATCHED THEN DELETE
>> (http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.sqls.doc/sqls580.htm)
Actually reading the fine print it appears to be XPS. :-(
Anyway, definitely something for that requirements db of the group.
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab