
JohnDanter2
VIP Member
Hi folks
I have created a new custom view in JDE V554611B to help with a watchlist I need to make.
But when people are testing this in SQL they get totally different results and I've worked out why
There is a left outer join from F4611 to F00092 and if use SQL to replicate the BSVW and place the select values in the left outer join it works, if I place the join in the overall final WHERE statement it doesn't (in this case it matches the watchlist count linked to the APPL)
So any ideas (other than a dropped view in SQL) to help E1 force the values to select on in the left outer command not the overall where
This brings back the expected results as the 'where' is in the left outer join specifics
vs this that only brings ONE record (F00092 matches) if the where is in the overall.
But we have no way to do that in E1. The values used in the select will always be added to the final where
I have created a new custom view in JDE V554611B to help with a watchlist I need to make.
But when people are testing this in SQL they get totally different results and I've worked out why
There is a left outer join from F4611 to F00092 and if use SQL to replicate the BSVW and place the select values in the left outer join it works, if I place the join in the overall final WHERE statement it doesn't (in this case it matches the watchlist count linked to the APPL)
So any ideas (other than a dropped view in SQL) to help E1 force the values to select on in the left outer command not the overall where
This brings back the expected results as the 'where' is in the left outer join specifics
Code:
select --* Watchlist for work order pick errors
ibanpl, count(*)
from crpdta.f4611
inner join crpdta.f4102 on ibitm = r2itm and ibmcu = r2mcu
left outer join crpdta.f0101 on ibanpl = aban8
left outer join crpdta.f00092 on t3mcu = r2mcu and t3rmk2 = r2aisl and t3sdb = 'BU' and t3tydt ='WA'
where r2tyfl = '2' and r2mcu = ' 245' and r2pstb = '300' and r2ocde = 'WO'
group by ibanpl
order by ibanpl ;
vs this that only brings ONE record (F00092 matches) if the where is in the overall.
Code:
select --* Watchlist for work order pick errors
ibanpl, count(*)
from crpdta.f4611
inner join crpdta.f4102 on ibitm = r2itm and ibmcu = r2mcu
left outer join crpdta.f0101 on ibanpl = aban8
left outer join crpdta.f00092 on t3mcu = r2mcu and t3rmk2 = r2aisl
where r2tyfl = '2' and r2mcu = ' 245' and r2pstb = '300' and r2ocde = 'WO' and t3sdb = 'BU' and t3tydt ='WA'
group by ibanpl
order by ibanpl ;
But we have no way to do that in E1. The values used in the select will always be added to the final where
Code:
VIEW: V554611B
SYSTEM CODE: 55
DESCRIPTION: RRD JET BSVW for WO suggestions
TYPE Standard
TABLES:
F4611 Warehouse Suggestions
F4801 Work Order Master File
F41021 Item Location File
F4102 Item Branch File
F00092 Supplemental Data
F0101 Address Book Master
ALIAS DESCRIPTION TYPE SIZE DECIMALS TABLE KEY
DOCO Document (Order No, Invoice, etc.) Math Numeric 8 0 F4611(0)
DOCO Document (Order No, Invoice, etc.) Math Numeric 8 0 F4801(0)
DCTO Order Type String 2 0 F4611(0)
DCTO Order Type String 2 0 F4801(0)
ITM Item Number - Short Math Numeric 8 0 F4611(0)
ITM Item Number - Short Math Numeric 8 0 F41021(0)
MCU Business Unit String 12 0 F4611(0)
MCU Business Unit String 12 0 F41021(0)
FLOC Location - From String 20 0 F4611(0)
LOCN Location String 20 0 F41021(0)
FLOT Lot - From String 30 0 F4611(0)
LOTN Lot/Serial Number String 30 0 F41021(0)
ANPL Customer Number Math Numeric 8 0 F4102(0)
AN8 Address Number Math Numeric 8 0 F0101(0)
MCU Business Unit String 12 0 F00092(0)
AISL Aisle String 8 0 F4611(0)
RMK2 Name - Remark String 30 0 F00092(0)
ITM Item Number - Short Math Numeric 8 0 F4102(0)
MCU Business Unit String 12 0 F4102(0)
SGBT Batch Number - Suggestions Math Numeric 8 0 F4611(0) X
SGSQ Sequence Number - Suggestion Math Numeric 7 0 F4611(0) X
SDB Supplemental Database Code String 4 0 F00092(0)
TYDT Type Data String 2 0 F00092(0)
SBA1 Supplemental Data Alpha Key 1 String 10 0 F00092(0)
KCO Document Company String 5 0 F00092(0)
SBA2 Supplemental Data Alpha Key 2 String 10 0 F00092(0)
SBN1 Supplemental Data Numeric Key 1 Math Numeric 8 0 F00092(0)
SBN2 Supplementat Data Numeric Key 2 Math Numeric 8 0 F00092(0)
UKID Unique Key ID (Internal) Math Numeric 15 0 F00092(0)
OCDE Code - Origin String 2 0 F4611(0)
RQBT Batch Number - Requests Math Numeric 8 0 F4611(0)
RQSQ Sequence Number - Request Math Numeric 7 0 F4611(0)
PHAS Phase Char 1 0 F4611(0)
TQTY Quantity -Total Math Numeric 15 0 F4611(0)
UOM1 Unit of Measure - Primary String 2 0 F4611(0)
DSC1 Description String 30 0 F4611(0)
DSC2 Description - Line 2 String 30 0 F4611(0)
DTCR Date - Created (Julian) Date 6 0 F4611(0)
EKEY Error Message Key String 4 0 F4611(0)
RCDS Status - Record Char 1 0 F4611(0)
PSTB Status - Task / Trip String 3 0 F4611(0)
LNTY Line Type String 2 0 F4611(0)
USER User ID String 10 0 F4611(0)
UPMJ Date - Updated Date 6 0 F4611(0)
TDAY Time of Day Math Numeric 6 0 F4611(0)
URAB User Reserved Number Math Numeric 8 0 F4611(0)
SRST Status Code W.O. String 2 0 F4801(0)
ANSA Address Number - Manager Math Numeric 8 0 F4801(0)
UORG Units - Order/Transaction Quantity Math Numeric 15 0 F4801(0)
URAB User Reserved Number Math Numeric 8 0 F4801(0)
WR01 Mfg Line String 4 0 F4801(0)
TYPS Type - W.O. Char 1 0 F4801(0)
STRT Date - Start (Julian) Date 6 0 F4801(0)
WR02 Priority String 3 0 F4801(0)
ITM Item Number - Short Math Numeric 8 0 F4801(0)
RMK Name - Remark String 30 0 F00092(0)
LOTS Lot Status Code Char 1 0 F41021(0)
PQOH Quantity on Hand - Primary units Math Numeric 15 0 F41021(0)
ALPH Name - Alpha String 40 0 F0101(0)
TYFL Code - Warehouse Char 1 0 F4611(0)
ZONR Zone - Replenishment String 6 0 F4611(0)
KZON Zone - Picking String 6 0 F4611(0)
PZON Zone - Putaway String 6 0 F4611(0)
PACK Code - Packing String 4 0 F4611(0)
URCD User Reserved Code String 2 0 F4801(0)
JOINED COLUMNS:
F4611(0) DOCO =Left Outer(*=) F4801(0) DOCO
F4611(0) DCTO =Left Outer(*=) F4801(0) DCTO
F4611(0) ITM =Left Outer(*=) F41021(0) ITM
F4611(0) MCU =Left Outer(*=) F41021(0) MCU
F4611(0) FLOC =Left Outer(*=) F41021(0) LOCN
F4611(0) FLOT =Left Outer(*=) F41021(0) LOTN
F4102(0) ANPL =Simple(==) F0101(0) AN8
F4611(0) MCU =Left Outer(*=) F00092(0) MCU
F4611(0) AISL =Left Outer(*=) F00092(0) RMK2
F4611(0) ITM =Simple(==) F4102(0) ITM
F4611(0) MCU =Simple(==) F4102(0) MCU
Last edited: