Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: February 14, 2018 - 6:37 pm UTC

Last updated: February 15, 2018 - 7:08 am UTC

Version: 11g

Viewed 1000+ times

You Asked

Right now data like this,

Case# Unit#

------------------------

X0002270301 null
X0002460601 T0707802116
X0002460601 null
X0002683101 null
x0002683101 T0721128616
x0002922501 null
x0005125201 null
x0005125201 T0813774816


Need a sql to select data like below, which is not having duplicate case# with null unit#. Thanks.

X0002270301 null
X0002460601 T0707802116
X0002683101 T0721128616
X0002922501 null
X0005125201 T0813774816

and Connor said...

There is a certain irony to a question about duplicates that you posted twice!

Rating

  (4 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Easy

Gh, February 15, 2018 - 7:52 am UTC

Select irony group by ironest

Indeed

Gh, February 17, 2018 - 10:57 am UTC


Or if you prefer..

Gh, February 17, 2018 - 11:03 am UTC

Select distinct all cols..from t. Simply.

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.