Question john.smith4237 · Jan 2, 2025

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

Comments

Robert Cemper · Jan 2, 2025

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 ?

0
Robert Cemper · Jan 2, 2025

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 obsolete
0
john.smith4237  Jan 2, 2025 to Robert Cemper

LIST 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 !?

0