View previous topic :: View next topic |
Author |
Message |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Mon Oct 03, 2011 1:48 pm Post subject: |
|
|
Have you yet worked with your dba or some senior?
If not, why not?
If you have, what did they say? _________________ All the best,
di |
|
Back to top |
|
 |
shyamsaravan Beginner
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
|
Posted: Tue Oct 04, 2011 4:10 am Post subject: |
|
|
Hi;
No one helped me..They did not have the answer..so that i came again to Forum |
|
Back to top |
|
 |
papadi Supermod
Joined: 20 Oct 2009 Posts: 594 Topics: 1
|
Posted: Tue Oct 04, 2011 1:44 pm Post subject: |
|
|
If no one in your organization is capable of doing this in sql, you need to consider an alternative. . .
Even if someone posts what you eventually can use, you should not use it. It is a very bad practice to implement "stuff" that is not understood and will most likely not be maintainable by the local people. If it breaks in production some night, the forum will most likely not be able to fix or rewrite it as fast as you will want. _________________ All the best,
di
Last edited by papadi on Thu Oct 06, 2011 10:15 am; edited 1 time in total |
|
Back to top |
|
 |
shyamsaravan Beginner
Joined: 12 May 2010 Posts: 44 Topics: 12 Location: India
|
Posted: Thu Oct 06, 2011 6:02 am Post subject: |
|
|
Hi;
The posted code(Kolusu) is ok with us,the only thing is we have some issues of row returns to the result set..I just explained in the previous post
The query missed some of the records while return to result set..so that i asked again for the doubt...
Below as my getting output
Code: |
IN_LOC PART_NO MATT_DE CALEN_YEAR WKLY_PR EFF_DT USER_NAME
----------- ------------ --------- ------------ ---------- -------------- ------------
ALDDD 6065 AB 2011 100 2011-07-31 JOHN
ALDDD 6065 AB 2011 621 2009-10-22 PETER
ALDDD 6065 AB 2011 - - - <---should not return
ALDDD 6065 AB 2012 - - -
ALDDD 6065 AB 2013 0 2013-01-13 RAMESH
ALDDD 6065 AB 2013 - - - <---should not return
<---2011 rec should return
ALDDD 6065 DE 2012 111 2012-07-28 GOPI
ALDDD 6065 DE 2012 - - - <---should not return
ALDDD 6065 DE 2013 210 2013-07-28 GOPI
ALDDD 6065 DE 2013 - - - <---should not return
ALDDD 6065 FF 2011 - - -
ALDDD 6065 FF 2012 - - -
ALDDD 6065 FF 2013 - - -
<---2011 rec should return
<---2012 recshould return
ALDDD 6065 GG 2013 333 2013-01-04 SAGAR
ALDDD 6065 GG 2013 - - - <---should not return
<---2011 rec should return
ALDDD 6065 JJ 2012 300 2012-02-04 SAGAR
ALDDD 6065 JJ 2012 - - - <---should not return
ALDDD 6065 JJ 2013 430 2013-01-04 SAGAR
ALDDD 6065 JJ 2013 - - - <---should not return
|
Expected output
Code: |
IN_LOC PART_NO MATT_DE CALEN_YEAR WKLY_PR EFF_DT USER_NAME
----------- ------------ --------- ------------ ---------- -------------- ------------
ALDDD 6065 AB 2011 100 2011-07-31 JOHN
ALDDD 6065 AB 2011 621 2009-10-22 PETER
ALDDD 6065 AB 2012 - - -
ALDDD 6065 AB 2013 0 2013-01-13 RAMESH
ALDDD 6065 DE 2011 - - -
ALDDD 6065 DE 2012 111 2012-07-28 GOPI
ALDDD 6065 DE 2013 210 2013-07-28 GOPI
ALDDD 6065 FF 2011 - - -
ALDDD 6065 FF 2012 - - -
ALDDD 6065 FF 2013 - - -
ALDDD 6065 GG 2011 - - -
ALDDD 6065 GG 2012 - - -
ALDDD 6065 GG 2013 333 2013-01-04 SAGAR
ALDDD 6065 JJ 2011 - - -
ALDDD 6065 JJ 2012 300 2012-02-04 SAGAR
ALDDD 6065 JJ 2013 430 2013-01-04 SAGAR
|
Please help me..
Thanks; |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Thu Oct 06, 2011 2:59 pm Post subject: |
|
|
shyamsaravan, in your query this is causing extra rows.
Code: | WHERE C.EFF_DT > '0001-01-01'
OR C.EFF_DT IS NULL |
_________________ Regards,
Diba |
|
Back to top |
|
 |
|
|