SELECT p.masterproviderid , rp.specialtyname , ps.specialtyid FROM providermaster p, providerspecialty ps , provideraddress pa, rfproviderspecialty rp WHERE p.MASTERPROVIDERID=1148421 and p.expireddate IS NULL AND rp.specialtyid (+) = PS.SPECIALTYID AND p.masterproviderid = ps.masterproviderid (+) AND pa.masterproviderid = p.masterproviderid
Am getting the result like this
MASTERPROVIDERID","SPECIALTYNAME", "SPECIALTYID" "1148421", "Genetics" "44" "1148421", "Genetics" "44" "1148421", "Genetics" "44" "1148421", "Genetics" "44" "1148421", "Genetics - Clinical", "45" "1148421", "Genetics - Clinical", "45" "1148421", "Genetics - Clinical", "45" "1148421", "Genetics - Clinical", "45" "1148421","Genetics - Clinical Molecular","47" "1148421","Genetics - Clinical Molecular","47"
But I want the result as
MASTERPROVIDERID","SPECIALTYNAME", "SPECIALTYID" "1148421", "Genetics" "44" "1148421", "Genetics - Clinical", "45" "1148421","Genetics - Clinical Molecular","47"
Please suggest how should I tweak this query
|