I have a flat table containing millions of records (900 million rows)
Write SQL function and VBA function to do the following:
1. Sort Ascending by Train_ID
2. Sort Ascending by Actual_Datetime
3. In the Geography_Name_From Column, copy the second value B3 to the Geography_Name_To Column C2 and B4 to C3 etc
See example in the sample data attached.
When I run the function in SQL Server 2010, it should do the above steps. The function will be run against millions of records hence it should also do the indexing.
I also need the same function in VBA – MS Access
I need this job to be done within 1 – 3 hours.