Hi,
I'm new to sqlserver.
The following query using in oracle db. I would like to convert the query according to SQL Server2000 DB. Any help would be appreciated.
Query :
--------
SELECT DISTINCT a.nmi,
(SELECT COUNT (*) FROM tbill, tbilldate
WHERE tbill.dt_bill(+) = tbilldate.dt_bill
AND nmi(+) = a.nmi
AND tbilldate.dt_bill
BETWEEN
(SELECT MIN(dt_bill) FROM tbill
WHERE nmi = a.nmi)
AND (SELECT MAX(dt_bill) FROM tbill
WHERE nmi = a.nmi)
AND nmi IS NULL) COUNT
FROM tbill a
Thanks in advance.
Raj
I'm new to sqlserver.
The following query using in oracle db. I would like to convert the query according to SQL Server2000 DB. Any help would be appreciated.
Query :
--------
SELECT DISTINCT a.nmi,
(SELECT COUNT (*) FROM tbill, tbilldate
WHERE tbill.dt_bill(+) = tbilldate.dt_bill
AND nmi(+) = a.nmi
AND tbilldate.dt_bill
BETWEEN
(SELECT MIN(dt_bill) FROM tbill
WHERE nmi = a.nmi)
AND (SELECT MAX(dt_bill) FROM tbill
WHERE nmi = a.nmi)
AND nmi IS NULL) COUNT
FROM tbill a
Thanks in advance.
Raj