Hello,
I have a database with a two tables named invoices and line_items.
The line_item table contains information about each line_item from an
invoice.
TABLE invoices (
invoice_number text,
date date,
due_date date,
status varchar(20),
num_of_line_items int(11),
customer_po_number varchar(20),
ship_via varchar(20),
ship_date date,
terms varchar(20),
sales_rep varchar(20),
customer_id int(11),
invoice_total text,
modified_date date
);
--
TABLE line_items (
line_item_id int(11),
invoice_number text,
item_number text,
number_of_items varchar(10),
discount varchar(10),
sell_price text
);
Now I can have multiple linr_items per invoice.
How can I query my database to select the invoice_number for multiple
line items?
That is, how can I retrieve the invoice_number for the invoice(s) that
have both item_numbers '54321' and '56789'?
Thanks,
Murrah Boswell