Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Oracle (http://www.go4expert.com/forums/oracle-forum/)
-   -   Query to fine blank records (http://www.go4expert.com/forums/query-fine-blank-records-t28754/)

dolphine4u 20Jul2012 10:21

Query to fine blank records
 
Hi All,

I have a table with column Part_no, Revision, Alternative & Preferred

Table data as below

PART_NO REVISION ALTERNATIVE PREFERRED
11000162 1 1 1
11000162 2 1 1
11000162 3 1 1
11000162 4 1 1
11000162 4 2 0
11000162 5 1 1
11000162 5 2 0
11000162 6 1 1
11000162 6 2 0
11000162 7 1 1
11000162 7 2 0
11000162 8 1 1
11000162 8 2 0
11000162 9 1 1
11000162 9 2 0
11000162 10 2 0

In above data you see part no has 10 revision where few revision has 1, 2 alternative and 1 alternative has preferred 1 & 2 alternative has preferred 0 so i want a query which check preferred only 0 how can i get this.
Note: if alternative 1 preferred is 0 and if alternative 2 has 1 then i dont want to fetch such record. I want the output to show only prefererred 0.
It should check how many alternative it has and all alternative should be 0 then only that revision data has to be displayed pls help

TIA

xpi0t0s 21Jul2012 03:33

Re: Query to fine blank records
 
>>In above data you see part no has 10 revision where few revision has 1, 2 alternative and 1 alternative has preferred 1 & 2 alternative has preferred 0 so i want a query which check preferred only 0 how can i get this.

Well, I know YOU know what that means, cos you wrote it, but it makes no sense to me. Please split it into simple facts, for example:
In above data you see part no has 10 revision where:

few revision has 1, 2 alternative,
1 alternative has preferred 1;
2 alternative has preferred 0

- or whatever it's meant to be.

>>i want a query which check preferred only 0

Again that doesn't make a lot of sense. Can you give the output you want to see from the query, for example should it be:

PART_NO REVISION ALTERNATIVE PREFERRED
11000162 4 2 0
11000162 5 2 0
11000162 6 2 0
11000162 7 2 0
11000162 8 2 0
11000162 9 2 0
11000162 10 2 0

or something else?


All times are GMT +5.5. The time now is 15:23.