Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a table of file names and I want to load all files except last file (max number). I will use "for loop" to load files. How can I remove last row from the table
FileName
1
2
3
4
I want
FileName
1
2
3
Hi
Please have a look this one.
Thanks
Hi Naskar,
Can you please explain the procedure to achieve.
As I'm using personal edition.
Thanks in Advance.
Regards,
Pavan.
Hi
Please try this script :
Loading data form Source :
Temp_Data:
LOAD FileName,
rowno() as Recno
FROM
Data2.xlsx
(ooxml, embedded labels, table is Sheet1);
Find the last record form source:
LoadMax:
Load max(Recno) as Recno1 Resident Temp_Data;
Let vMaxNo=Peek('Recno1',0,'LoadMax');
Data:
NoConcatenate
LOAD
*
Resident Temp_Data where Recno<>$(vMaxNo);
Drop tables Temp_Data,LoadMax;
Thanks