Seems like you could also simply do

With TEMP1 as
(
Select
IMITM, IMLITM, IMDSC1, IMSTKT, IMSRP1, IMSRP2, IMSRP3, IMSRP4
from BEHPROD.F4101
where IMLITM = '1169091'
)
select * From temp1;


With TEMP2 as
(Select IBITM, IBMCU, IBLITM, IBSTKT, IBSRP1, IBSRP2, IBSRP3, IBSRP4
from BEHPROD.F4102
where IBLITM = '1169091'
)
select * From temp2;

With TEMP3 as
(
select LIITM, LIMCU, IMLITM, LIPQOH
from BEHPROD.F41021
join BEHPROD.F4101
on LIITM = IMITM
where IMLITM = '1169091'
)
select * From temp3;
//

On 2/18/2026 8:59 AM, Stephen Landess wrote:
With TEMP1 as
(
Select
IMITM, IMLITM, IMDSC1, IMSTKT, IMSRP1, IMSRP2, IMSRP3, IMSRP4
from BEHPROD.F4101
where IMLITM = '1169091'
) ,

TEMP2 as
(Select IBITM, IBMCU, IBLITM, IBSTKT, IBSRP1, IBSRP2, IBSRP3, IBSRP4
from BEHPROD.F4102
where IBLITM = '1169091'
) ,

TEMP3 as
(
select LIITM, LIMCU, IMLITM, LIPQOH
from BEHPROD.F41021
join BEHPROD.F4101
on LIITM = IMITM
where IMLITM = '1169091'
)

select * From temp1;
select * from temp2;
select * from temp3;

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.