Re: INTERSECT

From: Umar FArooq <umar.farooq_at_cressoft.com.pk>
Date: Fri, 15 May 1998 11:56:07 +0500
Message-ID: <355BE707.42D89EEB_at_cressoft.com.pk>


M. Thomas Groszko wrote:

> I am porting an application from Oracle to Sybase. Does anybody here
> know
> the Sybase for Intersect?
>
> SELECT PART.MFGR_CODE, PART_NUMBER,
> PART_DESC, ALTPART.ALT_NUM, ALT_DESC
> FROM PART (MRU), ALTPART (MRU), PARTNOUN (MRU)
> WHERE PART.ALT_NUM *= ALTPART.ALT_NUM
> AND PARTNOUN.PART_NUM = PART_NUMBER
> AND PARTNOUN.MFGR_CODE = PART.MFGR_CODE
> AND NOUN = 'NUT'
> INTERSECT
> SELECT PART.MFGR_CODE, PART_NUMBER,
> PART_DESC, ALTPART.ALT_NUM, ALT_DESC
> FROM PART (MRU), ALTPART (MRU), PARTNOUN (MRU)
> WHERE PART.ALT_NUM *= ALTPART.ALT_NUM
> AND PARTNOUN.PART_NUM = PART_NUMBER
> AND PARTNOUN.MFGR_CODE = PART.MFGR_CODE
> AND NOUN = 'BOLT'
   try using
SELECT stmt 1
WHERE EXISTS
SELECT stmt2

Umar Farooq CHaudhri
Software Engineer
Crescent Software Products (Pvt.) (Ltd.) Received on Fri May 15 1998 - 08:56:07 CEST

Original text of this message