Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subfile is loaded with SQL

Status
Not open for further replies.

TracyV

Programmer
Nov 24, 2003
35
US
I have a subfile program that is loaded via SQL. I want to add a "position to" field to allow the user to reposition the subfile. How do I code the SQL to perform this function?
 
Never heard of anybody building a subfile from SQL before.
If you have a large file you are reading a lot of records that you might not need to read if you used a SETLL on a logical file.

I could be wrong, but for a 'position to', I don't think you can without creating a procedure that reads through the subfile records after they have been loaded from SQL and doing a comparison between the required 'poisition to' value and the field you are comparing it to.

Once you have found the record that first satisfies your criteria, set the subfile relative record number ( SFLRCDNBR ) to the record you want to be at the top of your subfile page.




Dazed and confused
 
Thanks for the input, but I figured it out. The reason I am using SQL for the subfile is to allow the users a flexible way to search on names. I used the positon to as a variable in the SQL and did a search that was >= to the varible which set the subfile beginning with the search variable and records following it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top