Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
In the example below I try to mix different input files.
From new files only new lines may be selected. When I use “WHERE NOT EXISTS (KEY)” nothing of file
B will be selected. In my opinion the second line of file B should be selected.
That’s what I want.
//=====EXAMPLE=========================================================================
:
LOAD * INLINE [
DATE, TICKET, LINE, SHOPCODE, QTY, KEY
05-06-2013, 100, 1, SH1, 10, SH1_100_1
05-06-20...
;
CONCATENATE LOAD
DATE,
TICKET,
LINE,
SHOPCODE,
QTY,
KEY
RESIDENT
WHERE NOT EXISTS (KEY);
DROP TABLE ;
DROP TABLE ;
your mistake is
as you have table B then all keys are exists in the model already so nothing is reloaded
you can do it like this
[SALES]:
NOCONCATENATE LOAD
DATE,
TICKET,
LINE,
SHOPCODE,
QTY,
KEY AS NewKEY
CONCATENATE LOAD
DATE,
TICKET,
LINE,
SHOPCODE,
QTY,
KEY AS NewKEY
RESIDENT
WHERE NOT EXISTS (NewKEY,KEY);
DROP TABLE ;
DROP TABLE ;
your Query is not clear bit confusing. what Out put exactly want ?
Thanks guys for your great help. Many answers where correct. It is clear to me now so I can finish my script.