Hi Experts,
I need to load certain number of loads with multiple files. I have attached a sample file.
Prefix the LOAD with a 'First n' clause. For example, to get the first 100 rows:
First 100 LOAD .... FROM ....
Hi Jonathan,
I can't specify 100 because it changes file to file. For Eg In file one ID2 starts in the 6th row but in second file ID2 may starts from 1000.
Thanks & Regards,
Dineshraj
Hi Dineshraj,
I created a little script which marks the first row with 1, if the column ID changes to ID2, this number is increaded with 1. So then you do a resident with a where clause: Check = 1
LOAD
ID,
IF(ROWNO()=1,1,IF(ID<>'ID2',PEEK('Check',-1),PEEK('Check',-1) + 1)) AS Check,
Amount
FROM
\\SSCDATA09.frd.shsdir.nl\LT_516745$\Downloads\Sample.xlsx
(ooxml, embedded labels, table is Sheet1);
Hi Van Keep,
It is not working for multiple sheets loading.
Thanks & Regards,
Dineshraj
Your original question was answered above, but it seems like you need more than you asked.
If it is not a constant number of rows, then perhaps you should explain in more detail your requirements. That would spare you and everyone else from playing guessing games.
Hi Dineshraj,
Then you could make a loop over the script I posted with the correct sheet names. Then store the data in een qvd and drop the table and then start the loop again untill you've got all the different sheets loaded.
Then you just load all .qvd's at once.