Nested queries
Hi Guys,
This Nested query is not working for some reason, but they work fine when executing separately ?
select id from FDRD_Com.List where vehicle in (select Car from FDRD_Com.Prod where ProductLineName='Toyota' and Car is not null)
Thanks
Product version: Ensemble 2018.1
Discussion (3)2
Comments
IN is expecting a list.
Did you ever try
select id from FDRD_Com.List where vehicle IN
(select LIST(Car) from FDRD_Com.Prod where ProductLineName='Toyota' and Car is not null)
on the sub select ?
different approach:
SELECT LI.id from FDRD_Com.List LI
JOIN FDRD_Com.Prod PR
ON LI.vehicle = PR.Car
WHERE PE.ProductLineName='Toyota'
AND PR.Car is not null -- might be obsoleteLIST didn't work but the Join did, thanks you very much Robert.
As I recall, Nest queries didn't work well if all in the old Cache versions so not sure if they improved it !?