George, I must say, you the man! And thanks for everyone else's help too. That I-descriptor works beautifully and saved me a ton of time, thanks a bunch. To get my results in order I have to do the double select, such as:
03 SELECT CLIENT BY NAME WITH NAME = "A]" 02 SELECT CLIENT WITH PAGE = 4 01 LIST CLIENT PAGE NAME returns the following: U058623 1 ALEXANDER U056354 1 ALEXANDER U05872 1 ALEXANDER U054398 1 ALEXANDER U054399 1 ALEXANDER Y056 1 ALICE ZMUDA Y0705 1 ALICE ZMUDA U054029B 1 ALLEN U056237 1 ALLEN U056238 1 ALLEN U060355 1 ALLEN Y016 1 ALLEN WHITE 1359 1 ALLSTATE ADJUSTERS U05609 1 ALMA J STRAIN U05405I 1 ALONZI U059501 1 ALSOP Y022 1 ALTERRA CLARE BRIDGE U054912 1 ALTMAN U058306 1 ALVIN A. K Since we're on this subject I must ask, how does this I-descriptor work? I'm not too familiar with UniVerse, it would be nice to know how the I-descriptor works so I can explain it to my colleague :) Chris > From: [email protected] > To: [email protected] > Date: Wed, 20 Jul 2011 16:13:41 -0500 > Subject: Re: [U2] SELECT question, paginated select. > > You only need to use the second select if you are sorting (using the BY). I > believe > if you are just doing a select, then you can append the WITH PAGE = x to your > statement. > > I don't know how your doing your SELECT from the web page. I don't know if you > can stack selects from it, so it will execute one SELECT, then follow it up > with > a second SELECT based on the results of the first SELECT. > > George > > > > > -----Original Message----- > > From: [email protected] [mailto:u2-users- > > [email protected]] On Behalf Of Chris Austin > > Sent: Wednesday, July 20, 2011 5:04 PM > > To: [email protected] > > Subject: Re: [U2] SELECT question, paginated select. > > > > > > George, > > > > I put PAGE in my CLIENT DICT so it looks like the following: > > > > PAGE > > 0001 I > > 0002 @1+1 ; INT((@1+1-2)/20)+1 > > 0003 > > 0004 PAGE > > 0005 6R > > 0006 S > > > > After I filed it I got a message stating an I-descriptor needs to be > > compiled but I didn't do that. When I do a LIST CLIENT PAGE I see the > > page #'s. > > > > To paginate in order using the 2 selects are you suggesting I do > > something like SELECT CLIENT WITH NAME = "A]" and then save that to a > > LIST where I use > > it in the 2nd SELECT with PAGE = 4? > > > > Thanks for the help so far, I believe I have the PAGE I-descriptor > > setup properly. > > > > Chris > > > > > > > From: [email protected] > > > To: [email protected] > > > Date: Wed, 20 Jul 2011 15:38:39 -0500 > > > Subject: Re: [U2] SELECT question, paginated select. > > > > > > This works with UV, and not the SQL solution. > > > > > > However, I did find if you need to do a sorted select, you first have > > to do the select > > > then a second select to pull the rows / pages > > > > > > SELECT CLIENT WITH NAME LIKE "A..." > > > SELECT CLIENT WITH PAGE = 4 > > > > > > SELECT CLIENT WITH NAME LIKE "A..." AND WITH PAGE = 4 WILL NOT WORK > > CORRECTLY > > > > > > I'm making the assumption that the @1 trick works in Pick flavor, as > > I'm > > > using Information flavor. > > > > > > George > > > > > > > -----Original Message----- > > > > From: [email protected] [mailto:u2-users- > > > > [email protected]] On Behalf Of Chris Austin > > > > Sent: Wednesday, July 20, 2011 4:34 PM > > > > To: [email protected] > > > > Subject: Re: [U2] SELECT question, paginated select. > > > > > > > > > > > > George, > > > > > > > > Is the dictionary change below used for the SQL solution you > > mentioned? > > > > In other words, do I have to add this to use the SQL queries > > > > to paginate it based on row? Or is this a trick to use a UniVerse > > > > SELECT? > > > > > > > > Chris > > > > > > > > > > > > > From: [email protected] > > > > > To: [email protected] > > > > > Date: Wed, 20 Jul 2011 15:22:44 -0500 > > > > > Subject: Re: [U2] SELECT question, paginated select. > > > > > > > > > > OK. Try this.... > > > > > > > > > > ED DICT CLIENT ROW > > > > > 0001: I > > > > > 0002: @1+1 > > > > > 0003: > > > > > 0004: ROW > > > > > 0005: 5R > > > > > > > > > > Now, you can SELECT CLIENT WITH ..... AND WITH ROW >=1 AND ROW > > <=20 > > > > > > > > > > As long as the selection stays the same, This "should" work. > > > > > > > > > > George > > > > > > > > > > > -----Original Message----- > > > > > > From: [email protected] [mailto:u2-users- > > > > > > [email protected]] On Behalf Of Chris Austin > > > > > > Sent: Wednesday, July 20, 2011 1:15 PM > > > > > > To: [email protected] > > > > > > Subject: [U2] SELECT question, paginated select. > > > > > > > > > > > > > > > > > > I'm working on a screen in our webapp where we're using a dojo > > > > widjet > > > > > > to create a drop down with client names. The problem > > > > > > is that we have 1,000's of clients and when we do a SELECT on > > this > > > > many > > > > > > clients it takes a while. I know we can index the field but > > > > > > I was wondering if you can do smart selecting in UniVerse. > > > > > > > > > > > > For example if I wanted to use this query: > > > > > > > > > > > > SELECT CLIENT WITH @ID = "A]" SAMPLE 10 (returns 10 clients > > > > starting > > > > > > with the letter A). > > > > > > > > > > > > I want to paginate my drop down so the first query has the > > above > > > > data. > > > > > > The problem I'm facing is that I don't know how to > > > > > > get the NEXT 10 clients? Is there a way to do this? > > > > > > > > > > > > For example if I wanted to return the next 10 CLIENTS, without > > > > > > including any of the first 10. > > > > > > > > > > > > Chris > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > U2-Users mailing list > > > > > > [email protected] > > > > > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > > > _______________________________________________ > > > > > U2-Users mailing list > > > > > [email protected] > > > > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > > > > > > _______________________________________________ > > > > U2-Users mailing list > > > > [email protected] > > > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > _______________________________________________ > > > U2-Users mailing list > > > [email protected] > > > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > > _______________________________________________ > > U2-Users mailing list > > [email protected] > > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
