Click to See Complete Forum and Search --> : select statement


tiger66
08-19-2003, 05:50 PM
Hi I have a database question
I am just wondering how can I extend my select statement below so that it only output selected record once for all the repeat record

select requestor,requestorfirstname, (decode(pcorderr, 1, 'PC')) as service
from pcOrder
where requestor='Joe'
and pcorderr =1

Thanks

Ribeyed
10-04-2003, 06:12 AM
HI,
use "SELECT DISTINCT(fieldname) " in your sql statement.

kanakaprasad
10-08-2003, 03:05 PM
try to avoid using distinct in select. cause if u have huge table then it takes time to fetch the data. so try to get the unique records posibly with select fields from *** way.

good luck