× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Michael,

Sorry, I just read my post and realized I misread the file names you were using
for the join and where clause. Ignore my previous post.

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of Chevalier, Rick
Sent: Tuesday, June 26, 2007 10:39 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Exception SQL Question


Michael,

I think what you have is a situation where you are returning records from
F4211la that are not in F59912. Then you are asking to only see the records
that are also in F59911. Because you are asking for exceptions, any records
returned fail the test in your where clause.

Try removing the where clause and see what you get. If that gets you closer
(returns some records) you might try moving the select from the where clause to
the top and create a temp table. It would look something like this: (not
tested)

With temptable as (select DISTINCT * from ajdevmdta.F59911 where CCTYPE = 'AB')

SELECT DISTINCT SDKCOO,SDDOCO,SDDCTO,SDLNID,SDMCU
FROM ajdevjdta.F4211la
EXCEPTION JOIN temptable ON
SDKCOO = CBKCOO
and SDDOCO = CBDOCO
and SDDCTO = CBDCTO
and SDLNID = CBLNID
and SDMCU = CBMCU
WHERE SDLNTY = 'S' and SDNXTR <= '560'
for READ ONLY

HTH,

Rick

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On
Behalf Of Ala, Michael A
Sent: Tuesday, June 26, 2007 9:28 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: Exception SQL Question


I am trying to determine Changes to an Order

A baseline is Taken (Detail-F59912)

And then the JDE Order Detail File Is compared to that

SELECT DISTINCT SDKCOO,SDDOCO,SDDCTO,SDLNID,SDMCU
FROM ajdevjdta.F4211la
EXCEPTION JOIN ajdevmdta.F59912 ON
SDKCOO = CBKCOO
and SDDOCO = CBDOCO
and SDDCTO = CBDCTO
and SDLNID = CBLNID
and SDMCU = CBMCU
WHERE SDDOCO in
(select DISTINCT CCDOCO from ajdevmdta.F59911 where CCTYPE = 'AB')
and SDLNTY = 'S' and SDNXTR <= '560'
for READ ONLY

This is not returning any results

Yet there is differences in the Data (SDMCU<>CBMCU on 2 Lines of the
Order)

One difference That I have identified is the Line number types are different
Packed and Zoned could that be creating an issue

I changed and SDLNID = CBLNID to and char(SDLNID) = char(CBLNID) and got the
same result

Any help with this Sql Statement would be appreciated

Thanks

Mike


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To
post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.




Privileged and Confidential. This e-mail, and any attachments there to, is
intended only for use by the addressee(s) named herein and may contain
privileged or confidential information. If you have received this e-mail in
error, please notify me immediately by a return e-mail and delete this e-mail.
You are hereby notified that any dissemination, distribution or copying of this
e-mail and/or any attachments thereto, is strictly prohibited.

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To
post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.