J
j.t.w
Hi All,
I am trying to make a query that will display line comments for each
line item on an order.
The following SQL statement works if any of the line items has a
comment in the db
ELINCMT_SQL table. If there are no comments for any
of the line items on the order, no records appear.
This is what I have so far:
SELECT db
EORDHDR_SQL.*, db
EORDLIN_SQL.*, db
ELINCMT_SQL.cmt
FROM (db
EORDLIN_SQL INNER JOIN db
EORDHDR_SQL ON
db
EORDLIN_SQL.ord_no = db
EORDHDR_SQL.ord_no) INNER JOIN
db
ELINCMT_SQL ON (db
EORDLIN_SQL.line_seq_no =
db
ELINCMT_SQL.line_seq_no) AND (db
EORDLIN_SQL.ord_no =
db
ELINCMT_SQL.ord_no)
WHERE (((db
EORDHDR_SQL.ord_no)=[Order Number]));
db
EORDHDR_SQL table (pretty standard):
ord_type pk
ord_no pk
cus_no
bill_to_name
inv_no
etc.
db
EORDLIN_SQL table (pretty standard):
ord_type pk
ord_no pk
line_seq_no pk
item_no
item_desc
qty_to_ship
uom
etc.
db
ELINCMT_SQL table:
ord_type pk
ord_no pk
line_seq_no pk
lvl_no pk
cmt_type pk
cmt_seq_no pk
cmt
etc.
I am trying to retrieve a list of all line items, whether or not they
have a comment associated with a line item.
If someone could help me out with this, I would greatly appreciate it.
Thanks,
j.t.w
I am trying to make a query that will display line comments for each
line item on an order.
The following SQL statement works if any of the line items has a
comment in the db
of the line items on the order, no records appear.
This is what I have so far:
SELECT db
FROM (db
db
db
db
db
WHERE (((db
db
ord_type pk
ord_no pk
cus_no
bill_to_name
inv_no
etc.
db
ord_type pk
ord_no pk
line_seq_no pk
item_no
item_desc
qty_to_ship
uom
etc.
db
ord_type pk
ord_no pk
line_seq_no pk
lvl_no pk
cmt_type pk
cmt_seq_no pk
cmt
etc.
I am trying to retrieve a list of all line items, whether or not they
have a comment associated with a line item.
If someone could help me out with this, I would greatly appreciate it.
Thanks,
j.t.w