Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to extract values from particular rows: first and second and incremented by 40 (1,2,41,42,81,82 etc)
Now i'm loading main table and in next loading table with resident statement, i don't know how to write where statement with incremental, I tried mod script but it dont work
Thank for all help
Greeting and have a nice day!
This seems to have worked for me
Table:
LOAD RowNo() as [Row Number]
AutoGenerate 1000;
FinalTable:
NoConcatenate
LOAD *
Resident Table
Where Mod([Row Number] - 1, 40) = 0 or Mod([Row Number] - 2, 40) = 0;
DROP Table Table;
So, basically if you create a field using RowNo() in your main table, you can use something like this in the resident load
Where Mod([Row Number] - 1, 40) = 0 or Mod([Row Number] - 2, 40) = 0;
This seems to have worked for me
Table:
LOAD RowNo() as [Row Number]
AutoGenerate 1000;
FinalTable:
NoConcatenate
LOAD *
Resident Table
Where Mod([Row Number] - 1, 40) = 0 or Mod([Row Number] - 2, 40) = 0;
DROP Table Table;
So, basically if you create a field using RowNo() in your main table, you can use something like this in the resident load
Where Mod([Row Number] - 1, 40) = 0 or Mod([Row Number] - 2, 40) = 0;