I would like to use the forcase statement using an external file in the order the records were created, not the indexed order, as in the pff where you can state the order.
Like forcase dict where ... order [indexed, sequential];
The default would be indexed, as it is now.
Or have another option in the set access statement.
set access (dict) [ascending, descending, sequential];
Best
Ari
forcase in sequential order
-
- Posts: 1796
- Joined: December 5th, 2011, 11:27 pm
- Location: Washington, DC
Re: forcase in sequential order
This is advanced, but you could fill in a list with the sequential keys be using the SqlQuery function with this query:
SELECT key FROM cases ORDER BY file_order;
Then you could loop through those keys and use the find/loadcase functions to process them in file order.
SELECT key FROM cases ORDER BY file_order;
Then you could loop through those keys and use the find/loadcase functions to process them in file order.
Re: forcase in sequential order
Note that Greg's suggestion will work for csdb files generated by versions 7.0 and 7.1 of CSPro but there is guarantee that it will work in csdb files generated by future versions of CSPro. In other words, we may change the schema of the database in the csdb files in the future so doing sql queries on the csdb may break if we do that.
Re: forcase in sequential order
Hi Josh,
Thank you for informed us about future changes and improvements.
Since Greg informed us month ago: http://csprousers.org/forum/viewtopic.p ... 592&p=8544
that sqlquery could be able to be used on items and record in the future, i think that, changes in the schema will not be an issue.
As you can imagine, query the csdb file allow users to solve multiples issues more easily.
Severals times, Greg advise to use sqlquery to solve some problems.
Best Regards,
Thank you for informed us about future changes and improvements.
Since Greg informed us month ago: http://csprousers.org/forum/viewtopic.p ... 592&p=8544
that sqlquery could be able to be used on items and record in the future, i think that, changes in the schema will not be an issue.
As you can imagine, query the csdb file allow users to solve multiples issues more easily.
Severals times, Greg advise to use sqlquery to solve some problems.
Best Regards,
G.VOLNY, a CSProuser from Haiti, since 2004