Hello,
I have the following script and instead of bringing back duplicate records I just want to bring back one of the records for each Image Link. This is an examaple for just two Supliers (Oracle Canada/Ceragem) but the script is used for hundrds of Suppliers.
SELECT
docs.supplier_name, docs.invoice_num, docs.invoice_sum_calc, 'caepayables.pwcinternal.com/…/ + docs.doc_id + ‘&SelectedView=ALL’ AS ImageLink,
flow_current.recipient_name, eflow_users.active
FROM
docs INNER JOIN
flow_current ON docs.doc_id = flow_current.doc_id INNER JOIN
eflow_users ON flow_current.recipient_name = eflow_users.user_name
WHERE
(docs.status_index = 1) AND (NOT (flow_current.recipient_name = N’MASTERUSER’)) AND (docs.supplier_name = N’ORACLE CANADA ULC’) OR
(docs.supplier_name = N’CERAGEM INTERNATIONAL INC.’)
Supplier Name
Invoice #
Invoice Funct. $
ImageLink
recipient_name
Status
ORACLE CANADA ULC
1129085
543.54
caepayables.pwcinternal.com/…/
Karen Gerry|L4
1
ORACLE CANADA ULC
1129085
543.54
caepayables.pwcinternal.com/…/
Linda Dhanushan|L4
1
ORACLE CANADA ULC
1129085
543.54
caepayables.pwcinternal.com/…/
Shira Gurel|L3
1
ORACLE CANADA ULC
1129085
543.54
caepayables.pwcinternal.com/…/
Karen J. Weeks|L4
1
CERAGEM INTERNATIONAL INC.
DIC826569201540173
496.78
caepayables.pwcinternal.com/…/
Melina Garcia|TCS
1
CERAGEM INTERNATIONAL INC.
DIC826569201540173
496.78
caepayables.pwcinternal.com/…/
Eythan Sabban|TCS
1
Thanks,