[thelist] help with tricky select statement

Michael Robertson mike at mikeemedia.com
Sat Jul 20 08:20:01 CDT 2002


Good questions

weight is a seperate column and i would like 2 seperate listings, one for
each entry (entry_num), but I'm only interested in users who have both
entries

Thanks a lot

=======================================

----- Original Message -----
From: "rudy" <r937 at interlog.com>
To: <thelist at lists.evolt.org>
Sent: Saturday, July 20, 2002 5:13 AM
Subject: Re: [thelist] help with tricky select statement


> > select user_id,emp_num
> > from tbl_user_data t1
>  > where entry_num='1'
> >  and emp_num=(select emp_num from tbl_user_data t2
> >    where entry_num='2' and t2.emp_num=t1.emp_num)
>
> michael, this looks a self-join (and there's another way to write it)
>
> > is there a way i can say get weight from first and get weight from
> > second record from tbl_user_data where emp_num is the same?
>
> before i give it a try, could you explain what you mean by weight?
>
> if that's a separate column, it should be easy
>
> are you interested in only those users that have both types of entry_num?
> what if they have only 1 or 2 but not both?  and do you need the weight
> separately for both, or would you like the weights combined?
>
> rudy
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>




More information about the thelist mailing list