× 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.



Hey,

If the item number will be EXACTLY '/6' for all shipping charges, you'd
do this:

SELECT COMPANY, ORDERNUMH FROM ORDERHEAD

INNER JOIN ORDERDETL ON ORDERNUMD = ORDERNUMH

WHERE SHIPDATE = 20071101
AND ITMNUM <> '/6'


-Chris Anderson
Partners Mutual
Waukesha, WI



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

message: 1
date: Fri, 2 Nov 2007 12:01:25 -0500
from: "Grizzly Malchow" <grizzlym@xxxxxxxxxxxxxxxxxxxxx>
subject: SQL Help

I'm trying to find out which shipments are missing a shipping charge.
Shipping charges appear on an order as a line item with the item number
= '/6'. I'm planning on using SQL, but I'm not quite sure about the
syntax.

I'm able to select shipments based on shipment date, but what I can't
figure out is how to check to see if one of the line items is the
shipping charge, or better yet only select those orders that do not have
a shipping charge.

Here's my syntax right now.



SELECT COMPANY, ORDERNUMH FROM ORDERHEAD

INNER JOIN ORDERDETL ON ORDERNUMD = ORDERNUMH

WHERE SHIPDATE = 20071101



This selects all orders and items for the specified ship date. I'd like
to trim that down to only select the orders that don't have an item
number = '/6'

Can anyone offer some suggestions?



Thanks in advance.

Griz



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

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) digest
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.



End of RPG400-L Digest, Vol 6, Issue 1091
*****************************************


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.