Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Please help, supposed I want to load all records from one table and i don't know how many records are present.
How can I do the scripting for the following:
1. Identify the number of records/rows in the table and use this value to select the records -
Supposed I have three millions rows, what I wanted to do is to divide the loading into six load as follows:
3M / 6 = 500,000
1st Load : Select Records from 1 - 500,000
2nd Load : Select Records from 500,001 - 1,000,000
.
.
6th Load : Select Records from 2,501,000 - TILL THE LAST RECORD
The script above will not be loaded one after the other, I will load this all at the same time.
Thanks. Marson
Hi Marson,
To identify number of records/rows need to use RowNo() function.
Like this:
[tblName]:
LOAD
RowNo() AS [No],
F1,
F2,
.....
Hope this help.
Regards,
Sokkorn
Will it automatically select the last record and get the rowno
OR go through all the records, get the rowno and store it in No Field?
to get the total no of records u can use function noofRecords(Fieldname).
Thanks
Vivek