Intrastat: LOAD YEAR("Posting Date") As Año, MONTH("Posting Date") As Mes, "Item No_" As "Nº Producto", DATE("Posting Date",'DD/MM/YYYY') As "Fecha", "Document No_" As "Nº Documento", "Country_Region Code" As "Código País", "Specie" As "Especie", "Variety" As "Variedad", "Category" As "Categoría", "Caliber" As "Calibre", "Country_Region of Origin Code" As "Código País Origen", "Tariff No_" As "Código Arancelario", "Quantity" As "Cantidad", IF("Quantity"<0,'Envío','Recepción') AS "Tipo Movimiento"; SELECT * FROM"$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item Ledger Entry" JOIN "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item" ON "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item Ledger Entry" ."Item No_" = "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item"."No_" JOIN "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Tariff Number" ON "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item"."Tariff No_" = "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Tariff Number"."No_"; [/Code] Running this I have no trouble just because all tha loaded fields belong to the first table
"Item Ledger Entry"
.
But If I include the field "Description" that belongs to the table "Tariff Number" like this:
"Quantity" As "Cantidad", IF("Quantity"<0,'Envío','Recepción') AS "Tipo Movimiento", "Description As "Descripción"; SELECT * FROM"$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item Ledger Entry" JOIN "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item" ON "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item Ledger Entry" ."Item No_" = "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item"."No_" JOIN "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Tariff Number" ON "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Item"."Tariff No_" = "$(_DBName)". "$(_DBOwner)". "$(_CompanyName)$Tariff Number"."No_";
I get an error. So the questions is where part of this script do I have to define the fields of the other tables that are part of the query? Thanks in advance