SQL Language (MOSC)

MOSC Banner

Need help on a query...

edited Nov 16, 2012 5:36AM in SQL Language (MOSC) 7 commentsAnswered ✓
Hello
I have a requirement to validate one header record with their corresponding lines record and if any one line record fails validation I want to fail all line records corresponds to that header record.Suppose I have a table XX_CS_VALIDATE having records as below

Condition: Value always increment of 0.5 hours for each line respect to each header

Header          Service Date                    Line              Hours       Expected Result
1                    19-Nov-2012                     1                  4                   Fail
1                    19-Nov-2012                     2                  4.5                Fail
1                     19-Nov-2012                    3                  3                   Fail
1                     19-Nov-2012                    4                  2                   Fail
2                      19-Nov-2012                   1                   2                  Pass
2                      19-Nov-2012                   2                  2.5                Pass
3                      19-Nov-2012                   1                   3                  Pass
4                       19-Nov-2012                   1                  4                  Fail
4                        19-Nov-2012                  2                  3.5               Fail


Header#1 should be updated as fail because line 3 and line 4 are not increment of 0.5 hour, so all four lines in header#1 should update as Fail

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center