Here is a table example:
TABLE 2 Fecha ID ID_Categoria MargenP Mes VentaP 40638 L001 1006 0,021054474 4 0,192956297 40638 L001 1007 0,00323144 4 0,013407976 40638 L001 1101 0,010650693 4 0,071221895 40638 L001 1102 0,019352952 4 0,236498163 TABLE 1 Año Costo Venta $ Departamento SAP Dia ID Local SAP Mes Unidades Vendidas Venta Neta $ 2011 -0,000346 ENVASES 40717 L001 CORONEL 6 1 0,000336134 2011 -0,000365 ENVASES 40698 L001 CORONEL 6 1 0,000336134 2011 -0,0048 PILETAS Y PARRILLAS 40721 L001 CORONEL 6 4 0,006354622 2011 -0,000692 ENVASES 40718 L001 CORONEL 6 2 0,00067227 2011 -0,015634 ELECTRO HOGAR 40721 L001 CORONEL 6 2 0,020739496 2011 -0,00039 ENVASES 40712 L001 CORONEL 6 1 0,000336134
Hi Camilo ,
I think you are getting snc because you are using
[Id SAP] as ID, &
id_local_int as ID both are with same colomn name can you use one as Sap_ID & other one as Local_ID or try to change year alias in any one of the table .
If still you are getting sync tables can you tell me what are the colomn's u r getting in sync table .
Hi, Syn are generated when there are more than one same field names in two tables. Try following code. Hope it will remove syn.
LOAD [Local SAP],
[Id SAP] as ID,
[Departamento SAP] as Departamento,
Month(Dia) as Mes_venta,
Year(Dia) as Año_venta,
Dia as Fecha,
[Venta Neta $]/1000000 as Venta,
[Costo Venta $]/-1000000 as Costo
id_local_int as ID,
Venta/1000000 as VentaP,
[Margen dia]/1000000 as MargenP,
Month(Fecha) as Mes,
Year(Dia) as Año,
I marked in bold the sync fields, I need them with the same names in both tables so I can use date or id filters that affects both tables.
If I dont do this when I click on one field such as Dia, I will only see the SAP table data an not the other table data (Fecha), the same happens with the ID field.
Hi Klaus, If I have more than six table where I need to link all the column to a common key name, so what is good appraoch to avoid the sync key. whether to concatenation or making a common key in all the table, ex: Table1, TB1_Business_Source, as Key Table2, TB2_Business_Source as Key Table3, TB3_Business_Source as Key Table4, TB4_Business_Source as Key Table5, TB5_Business_Source as Key Table6, TB6_Business_Source as Key Need help Best Regards,
Hi S Kumar,
I think if you are not ending up with a bunch of null values. give a atry to concatenation or else its always better to go for a composite key.
Its also depends on size of tables which you are having. If concatenation is increasing your tables size drasticlly go for Composite keys.
Hope this helps