Re: [U2] [UV] Hash.Help

2010-02-18 Thread Jeff Fitzgerald
Bill, You aren't able to resize files that are open -- since you are in the account whose VOC you are trying to resize, it is open by default. So resizing the VOC becomes a little tricky; here's a recipe: 1) Logout or quit to UNIX and then get to the UniVerse prompt in another account.

Re: [U2] [UV] Hash.Help

2010-02-18 Thread Brutzman, Bill
Thanks to Charlie, Jeff, John and especially Will. I expect to punt and reboot the box later today. It is valuable that Will is back on the list after perhaps a one year hiatus. --Bill -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Drew William Henderson
Universe stores records in hashed files, so the concept of the last 100 records doesn't really apply. You can use the SAMPLE keyword to specify a number of records to pull out: LIST target_file SAMPLE 100 HTH Drew -Original Message- From: u2-users-boun...@listserver.u2ug.org

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Oaks, Harold
Andrew: Indeed, the word is 'sample'. The command: SELECT MYFILE SAMPLE 100 will select the first 100 records as they are laid out internally in the file, so this is somewhat a random selection. But many times it's all you want - just get 100 records. The command SELECT MYFILE SAMPLED 100

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Caryl Lange
You can sort first and then SAMPLE, too. Best Regards, Caryl Lange Programmer/Business Analyst HME 14110 Stowe Drive Poway, California 92064 phone: (858) 646-8806 fax: (858) 535-6094 mailto:cla...@hme.com Visit our website: www.hme.com Avante on Windows/UniData, 9.1.7a way modified and tasty

Re: [U2] [UV] Hash.Help

2010-02-18 Thread FFT2001
In a message dated 2/18/2010 7:44:36 AM Pacific Standard Time, bi...@hkmetalcraft.com writes: Thanks to Charlie, Jeff, John and especially Will. I expect to punt and reboot the box later today. It is valuable that Will is back on the list after perhaps a one year hiatus. Yes like Dolly

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread FFT2001
In a message dated 2/18/2010 10:27:46 AM Pacific Standard Time, cla...@hme.com writes: You can sort first and then SAMPLE, too. Caryl has the idea here if you really want the Last 100. You can Sort BY-DSND which means by descending so if you want the last alphabetically or the last by ID or

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Adrian Halid
But how would you get the 2nd 100 (101 - 200) and the 3rd 100 (301 to 400) without writing a subroutine to do it? Regards Adrian Halid Senior Analyst/Programmer   IT Vision Australia Pty Ltd (ABN: 34 309 336 904) PO Box 881, Canning Bridge WA 6153 Level 3, Kirin Centre, 15 Ogilvie Road,

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Dan Fitzgerald
You could save the list, and edit it. But, really, there will be no logical relationship between these records. The 1st hundred is just as random as the 2nd or 3rd hundred, unless your modulus is an extremely ill-advised one. Again, they are hashed records. What we mean by this is that UV will

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread Adrian Halid
If I have a file of 100,000 products and I want to page them in a list of 100 on my website sorted by product name in attribute 1. SELECT PRODUCTS BY A1 This would return me all 100,000 products. So what would be my query when the website loads and I only want the 1st 100 by product name.

Re: [U2] TOP/LIMIT Equivalent?

2010-02-18 Thread FFT2001
No that reply wasn't paying attention to the point that we were *sorting* the list. True if you simply Sample the list, they are in random hashed order. But that is not true is the list comes into your program sorted by you execute a sort as the first statement in your program. No you do not

Re: [U2] Paging through a list [WAS] TOP/LIMIT Equivalent?

2010-02-18 Thread Boydell, Stuart
There are established patterns to do your paging which might be better but a very simple traversal through a selection by 100 could work like this. You can manipulate batchPos to move forward and back through the list. Program RowBatchSize = 100 quitCondition = @false selectStatement =