G
Guest
Hi,
I have a query that makes a table here is the sql view of it:
SELECT tbl_AcctPricing.BLACCT, tbl_AcctPricing.BNAME,
tbl_AcctPricing.BLRECT, tbl_AcctPricing.[BLREC#], tbl_AcctPricing.BLPLIST,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.Item,tbl_NewPriceList.Item) AS Item1,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.INAME,tbl_NewPriceList.INAME) AS INAME1,
tbl_NewPriceList.ICLAS1, tbl_NewPriceList.IPRCCD, IIf(tbl_AcctPricing.BLRECT
Like "I",qry_ItemPRiceList.LNAME,tbl_NewPriceList.LNAME) AS LNAME1,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.[$LIST#],tbl_NewPriceList.[$LIST#]) AS [$LIST#1],
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.[$P1],tbl_NewPriceList.[$P1]) AS [$P11] INTO tbl_test
FROM qry_ItemPRiceList RIGHT JOIN (tbl_NewPriceList RIGHT JOIN
tbl_AcctPricing ON (tbl_NewPriceList.[$LIST#] = tbl_AcctPricing.BLPLIST) AND
(tbl_NewPriceList.ICLAS1 = tbl_AcctPricing.[BLREC#])) ON
(qry_ItemPRiceList.[$LIST#] = tbl_AcctPricing.BLPLIST) AND
(qry_ItemPRiceList.Item = tbl_AcctPricing.[BLREC#]);
Now this newly created table may have item1 that can have a duplicate but
with the different BLRECT and $P1, what I need to make is show only one of
those records that has a lower value in $P1.
Let me know if I need to explain the process in more details. Thanks in
advance for the help.
I have a query that makes a table here is the sql view of it:
SELECT tbl_AcctPricing.BLACCT, tbl_AcctPricing.BNAME,
tbl_AcctPricing.BLRECT, tbl_AcctPricing.[BLREC#], tbl_AcctPricing.BLPLIST,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.Item,tbl_NewPriceList.Item) AS Item1,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.INAME,tbl_NewPriceList.INAME) AS INAME1,
tbl_NewPriceList.ICLAS1, tbl_NewPriceList.IPRCCD, IIf(tbl_AcctPricing.BLRECT
Like "I",qry_ItemPRiceList.LNAME,tbl_NewPriceList.LNAME) AS LNAME1,
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.[$LIST#],tbl_NewPriceList.[$LIST#]) AS [$LIST#1],
IIf(tbl_AcctPricing.BLRECT Like
"I",qry_ItemPRiceList.[$P1],tbl_NewPriceList.[$P1]) AS [$P11] INTO tbl_test
FROM qry_ItemPRiceList RIGHT JOIN (tbl_NewPriceList RIGHT JOIN
tbl_AcctPricing ON (tbl_NewPriceList.[$LIST#] = tbl_AcctPricing.BLPLIST) AND
(tbl_NewPriceList.ICLAS1 = tbl_AcctPricing.[BLREC#])) ON
(qry_ItemPRiceList.[$LIST#] = tbl_AcctPricing.BLPLIST) AND
(qry_ItemPRiceList.Item = tbl_AcctPricing.[BLREC#]);
Now this newly created table may have item1 that can have a duplicate but
with the different BLRECT and $P1, what I need to make is show only one of
those records that has a lower value in $P1.
Let me know if I need to explain the process in more details. Thanks in
advance for the help.