I'll have to play with this later - thanks for the info... George
-----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Brian Leach Sent: Thursday, October 18, 2012 6:50 AM To: 'U2 Users List' Subject: Re: [U2] Selection Suggestions for using UV instead of SQL Since the index files are actually type 25 files, you can always (though of course I would NEVER recommend this ... ) create a file pointer direct to the INDEX.nnn and read the entries as records ... saves grabbing a select list .. Brian -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists Sent: 18 October 2012 09:53 To: u2-users@listserver.u2ug.org Subject: Re: [U2] Selection Suggestions for using UV instead of SQL On 18/10/12 09:29, Martin Braid wrote: > I think you mean > SELECTINDEX index.name[,key.val] FROM file.var [TO list.num] > Martin Followed by a READLIST ... Quite possibly - I can't remember. One *important* point to note - if you are planning to call this from an i-descriptor, as I did, don't forget you MUST save that to a non-default list, or any attempt to LIST the idescriptor will go horribly wrong... Cheers, Wol > > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists > Sent: 18 October 2012 08:55 > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] Selection Suggestions for using UV instead of SQL > > On 17/10/12 16:40, George Gallen wrote: >> How would I get the contents of the Index? >> >> George > > Don't have the UV BASIC manual in front of me, but it's something like > > READINDEX variable FROM filedescriptor, indexname[, indexvalue] > > If you only pass filedescriptor and indexname, it will return a list of > all the index values. If you also pass indexvalue, it will return a list > of all keys for that value. > > I'll have a look later and see if I can find that routine - it's > probably on my system somewhere, but my archives aren't that > organised... > > Cheers, > Wol >> >> -----Original Message----- >> From: u2-users-boun...@listserver.u2ug.org >> [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wols Lists >> Sent: Wednesday, October 17, 2012 11:38 AM >> To: u2-users@listserver.u2ug.org >> Subject: Re: [U2] Selection Suggestions for using UV instead of SQL >> >> On 17/10/12 14:59, George Gallen wrote: >>> Ok. >>> >>> I have file1 - "people" that has @ID of PID I have file2 - >>> "registration" that has @ID of PID+EID+RID (EID = event id, RID = >>> registration id) >>> >>> I want to select people who are not in the registration file with an > EID of "1". >>> >>> With an SQL statement - I could join the two, then do the select or >>> use a subquery (I'm on UV 10.0.2 - not sure if sub querys work) Just > curious how this could be done with UV Native, and without involving a > program. >>> >>> I first tried "SELECT REGISTRATION WITH EID = '1' SAVING UNIQUE PID" > -> "NSELECT PEOPLE" >>> >>> But that returned 0 - since the NSELECT only works off the current >>> select list, not the whole file >>> >>> Yes, I could create a temporary file, then select off that Yes, I >>> could read each people record, then loop through registration to see > if it doesn't exist. >>> Both of the above require programming I guess I could create a >>> subroutine that does the looping through registration, and put that > into an I descriptor - looking for another option. >>> >> Hmmm... >> >> What I guess I'd do - create an index on file2 based on PID. >> >> Create an idescriptor on file1 that gets the contents of that index. I > >> had a routine somewhere that got fed an index value and file, and >> returned the contents of the index. It was quite useful, iirc. >> >> Manipulate it from there. Probably selecting where there is no value >> matching ...+1+... >> >> Cheers, >> Wol >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> _______________________________________________ >> U2-Users mailing list >> U2-Users@listserver.u2ug.org >> http://listserver.u2ug.org/mailman/listinfo/u2-users >> > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > > > Click > https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ== > eUdxXwzJfD+jSPSM4kcQUHfMaOyCAuUs69aXEW7R1X!lw== to report this email as > spam. > -------------------------------------------------------- > > Epicor Software (UK) is a limited company registered in England & Wales. > Registration Number: 2338274. Registered Office: 6th Floor, One London Wall, London EC2Y 5EB > This e-mail and any attachments to it are confidential and is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of Epicor Software (UK) Limited or any other company within its group. > > > This message has been scanned for malware by Websense. www.websense.com > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users