Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I´m loading 3 tables but I don´t know why the key fields (ID_Categoria,Departamento) aren´t working correclty, the model doesn´t link the info from Table1 with Table3. In Table1 just the field ID_Categoria should be sufficient to link that table with table 3, but this doesnt work, thats why I´m trying to complement that info adding the Departamento field with a lookup function but this doesn´t work either.
Please any advice would be welcome thanks!!!
//Table 1
Stage1.2v2:
LOAD Fecha,
id_local_int as ID,
ID_Categoria,
Venta as VentaP,
[Margen dia as MargenP
FROM
Stage1.2:
Load*, lookup('Departamento','ID_Categoria',ID_Categoria,'Categoria')as Departamento
Resident Stage1.2v2;
Drop table Stage1.2v2;
Concatenate
//Table 2
LOAD Replace([N° Local],' ','') as ID,
Replace([DepartamentoSAP],'','') as Departamento,
Dia as Fecha,
[Unidades Vendidas],
[Venta Neta $] as Venta,
[Costo Venta $] as Costo,
Margen
FROM
//Table3
Categoria:
LOAD ID_Area,
Area,
ID_Departamento,
Departamento,
ID_Categoria,
Categoria
FROM
I think you should Create the QVD Files with the final field name for the three tables, after that load all tables and see what hapens.
Dear Camio,
I don't see any problem in your script but then too I would suggest you to go step by step.
First load table 1:
//Table 1
Stage1.2v2:
LOAD Fecha,
id_local_int as ID,
ID_Categoria,
Venta as VentaP,
[Margen dia as MargenP
FROM
then load table 3:
//Table3
Categoria:
LOAD ID_Area,
Area,
ID_Departamento,
Departamento,
ID_Categoria,
Categoria
FROM
then see if they are linking properly....make sure you are not qualifying the fields.
to see, their links try to search for any ID_Categoria which you aure will be available in both.
then see if you are getting its info from both the tables...
hope it helps to proceed you..
Hi,
I´m not qualifiing any field, if I don´t use the Concatenate both tables (table1 and table2) got linked correctly with table 3 (but a lot of sinc key appears), but something happens when y use the concatenate that I loose that link.
I´ll try creating the qvd file with the same field names and see what happens.
Any other advice?
thanks,
Camilo