Information on Oracle SQL Needed (Intersect, Minus & Count(Distinct(||)))
Date: 1996/08/28
Message-ID: <01bb952c$5314eac0$12014ac1_at_huyghjo>#1/1
Hello,
I'm looking for information on the following problem:
In oracle SQL, besides UNION, you can also use MINUS and INTERSECT to query out data. Now I have to convert Powerbuilder 4.0 datawindows from Oracle SQL to SQLAnywhere (Sybase). Unfortunately, SQLAnywhere only knows UNION.
My solution is to replace the MINUS with a WHERE NOT EXISTS (SELECT....) and the INTERSECT with a WHERE EXISTS (SELECT...). Is there maybe another way which makes the system not so much slower????
Second problem:
SQLAnywhere doesn't support the following syntax:
SELECT COUNT(DISTINCT(field1 || field2))
A count(distinct()) of a concatination is not allowed. A possible solution is to pre-concatenate the fields in a view, and work with that view. Is there maybe an easier way?
Please reply at the e-mail adress below. Any help whatsoever is welcome. Thanx.
Johan.
Johan Huygh
E-mail: HuyghJo_at_dma.be
Received on Wed Aug 28 1996 - 00:00:00 CEST