Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Table1:
InvooiceNo | CustCode | ProdCode |
---|---|---|
1 | 10 | 100 |
2 | 20 | 200 |
3 | 30 | 300 |
4 | 40 | 400 |
Table2:
InvoiceNo | CustCode | ProdCode |
---|---|---|
1 | 10 | 100 |
2 | 20 | 200 |
9 | 90 | 300 |
8 | 80 | 400 |
5 | 50 | 500 |
6 | 60 | 600 |
7 | 70 | 700 |
Table3:
InvoiceNo | Table1.CustCode | Table2.CustCode |
---|---|---|
1 | 10 | 10 |
2 | 20 | 20 |
3 | 30 | - |
4 | 40 | - |
5 | 50 | |
6 | 60 | |
7 | 70 | |
8 | 80 | |
9 | 90 |
how to achieve Table3 from table 1 and table2?
Thanks.
or in exact columns only need to change path i believee
table1:
Load
InvooiceNo,
CustCode,
ProdCode
from table1;
table2:
Join(table1)
Load
InvooiceNo,
CustCode,
ProdCode
from table2;
table3:
Load
ProdCode,
BrandCode ,
BrandName
from table3;
Hi Sunil,
Please Find attached of my qvd file.
Thanks,
Sandeepa
In Data Tab in script
use this
IMSIRR:
LOAD CustCode,
TransType,
InvoiceNo,
InvoiceDate,
ProdCode,
Qty,
Amount,
InvType,
Week(MakeDate(Left( InvoiceDate,4), Mid(InvoiceDate, 5, 2), Right(InvoiceDate,2))) as Week,
'IMS' as Source
FROM
C:\OwnExtractImsFiles\FullDataofIMSdonotdelete.txt
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
Join(IMSIRR)
LOAD CustCode,
TransType,
InvoiceNo,
InvoiceDate,
ProdCode,
Qty,
LineValue,
Type as InvType,
Week(MakeDate(Left( InvoiceDate,4), Mid(InvoiceDate, 5, 2), Right(InvoiceDate,2))) as Week,
'IRR' as Source
FROM
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
hope this helps
Hi,
I think you have to load data some thing in sample file.
See the attached
Rgds
Anand