Loading a selection from a database based upon whats already loaded.
Hello I have a database I wish to use to create some data associations which are only held within the DB. I am having problems using the 'where exists Clause' as it tells me that the tables dont exist after the database loads. Here is the code I am using as an example.
Also please see attached.
Customer_Table : LOAD BP
OLEDB CONNECT32 TO [Provider=Microsoft.Jet.OLEDB.4.0; etc etc
Mosiac_raw: LOAD *, LEFT([Client Reference],10) AS BP; SQL SELECT `Client Reference`, `pc_mosaic_public_sector_group_alpha`, `pc_mosaic_public_sector_group_num`, `pc_mosaic_public_sector_type` FROM `Water_Append_Output` where exists(BP,LEFT([Client Reference],10)) ;
Mosaic: LOAD BP, min(pc_mosaic_public_sector_type) as Type Resident Mosiac_raw Group By BP;
LOAD BP, pc_mosaic_public_sector_type as Type, pc_mosaic_public_sector_group_alpha & num(pc_mosaic_public_sector_type,'00') as Code Resident Mosiac_raw;