It looks like you have hit the point where code is needed because the SELECT 
just cannot handle all the conditions cleanly.

My rule of thumb is: if I am going to need ANY code, do the whole thing in a 
program.  Experience has taught me that at some point, someone will want to 
tweak things, and if it is already in a program, I will not migrating my 
Paragraphs (or whatever) into a program and them abandoning the paragraph.  
This may mean that I have REALLY simple program initially, but all too often, 
they grow over time.  It also limits the number of places you need to look for 
"that piece of code that is doing something".

Just my 4 cents (2 cents w/ inflation)

John


-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, October 17, 2012 12:02 PM
To: U2 Users List
Subject: Re: [U2] Selection Suggestions for using UV instead of SQL

Meant to have left outer join, not inner join.

BUT.....I hit a snag.

If someone has entries in REGISTRATION with EID = '1' and an EID = '2' - they 
still get selected, since the it passes The <> '1' test, but the outer join 
also pulls in the EID = '2'. So I'm going to have To do a loop through, or 
maybe the index method may work as well.

Damn....

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, October 17, 2012 10:28 AM
To: U2 Users List
Subject: Re: [U2] Selection Suggestions for using UV instead of SQL

I'm OK with using SQL - just wondering how you could use UV native.

select distinct PEOPLE.PID from PEOPLE inner join REGISTRATION
  on (PEOPLE.PID = REGISTRATION.PID) where EID <> '1';

I will admit, UV could use a join clause.....

George

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, October 17, 2012 10:20 AM
To: U2 Users List
Subject: Re: [U2] Selection Suggestions for using UV instead of SQL

That was my first try, but the NSELECT only checks PEOPLE for those that are in 
the list returned by the first That are not in PEOPLE, it doesn't check for 
those in PEOPLE that are not in the list returned.

George

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Israel, John R.
Sent: Wednesday, October 17, 2012 10:05 AM
To: 'U2 Users List'
Subject: Re: [U2] Selection Suggestions for using UV instead of SQL

Do it in more than one command?
SELECT REGISTRATION WITH EID = '1' SAVING UNIQUE PID NSELECT PEOPLE

Or am I missing something?


John

-----Original Message-----
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of George Gallen
Sent: Wednesday, October 17, 2012 9:59 AM
To: U2 Users
Subject: [U2] Selection Suggestions for using UV instead of SQL

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.

George

_______________________________________________
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
_______________________________________________
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

Reply via email to