mohammadzahid
asked on
SQL to remove NULL and return 1 record
Hi,
I’ve a data situation where there is a need to suppress 2 rows into 1. Duplicate rows are due to the way data is stored in 2 separate records for 1 PM code. Here is an example:
SELECT /*+ FIRST_ROWS(50) */ pmcode
,Estimated_Time
,Date_reviewed
,ORGANIZATION
,ppm_class
FROM cmbc_pmschd_view;
Returns:
PMCODE ESTIMATED _TIME DATE_REVIEWED ORGANIZATION PPM_CLASS
1234 NULL 4/17/2014 ABC F123
1234 A NULL ABC F123
I would like to see is:
PMCODE ESTIMATED _TIME DATE_REVIEWED ORGANIZATION PPM_CLASS
1234 A 4/17/2014 ABC F123
I’ve a data situation where there is a need to suppress 2 rows into 1. Duplicate rows are due to the way data is stored in 2 separate records for 1 PM code. Here is an example:
SELECT /*+ FIRST_ROWS(50) */ pmcode
,Estimated_Time
,Date_reviewed
,ORGANIZATION
,ppm_class
FROM cmbc_pmschd_view;
Returns:
PMCODE ESTIMATED _TIME DATE_REVIEWED ORGANIZATION PPM_CLASS
1234 NULL 4/17/2014 ABC F123
1234 A NULL ABC F123
I would like to see is:
PMCODE ESTIMATED _TIME DATE_REVIEWED ORGANIZATION PPM_CLASS
1234 A 4/17/2014 ABC F123
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.