[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQL Select Question
- Subject: Re: SQL Select Question
- From: "Hood, Paul" <hoodp@BV.COM>
- Date: Thu, 9 Jul 1998 10:00:04 -0500
Duncan
Just use a does not exist in a subselect in your where clause.
> -----Original Message-----
> From: Connaghan, Rebecca [SMTP:RConnaghan@OMNIPOINT-CORP.COM]
> Sent: Thursday, July 09, 1998 10:01 AM
> To: Multiple recipients of list SQR-USERS
> Subject: Re: SQL Select Question
>
> Duncan
> Why don't you try a subselect:
>
> select from table A where not in (select from table B).
>
> > -----Original Message-----
> > From: C. Duncan Hudson [SMTP:c_duncan_hudson@YAHOO.COM]
> > Sent: Thursday, July 09, 1998 10:34 AM
> > To: Multiple recipients of list SQR-USERS
> > Subject: SQL Select Question
> >
> > I realize that this is really an SQL question, and not an SQR
> question
> > but I was hoping that with everyone's expertise here I could get a
> > quick (and satisfactory) answer.
> >
> > Here's my question. I want to create a report that selects about 10
> > columns from a single table. The selection should be based upon
> field
> > values within that table. Also (and here's where I'm having
> > problems), I need to look at another table to see if the first
> table's
> > primary key is represented in it. If it is, I want to exclude it
> from
> > my selection. Do you follow that? Here's a crude visual:
> >
> > TABLE A TABLE B
> > 100 98
> > 101 100
> > 105 108
> > 107 110
> > 110
> > 111
> >
> > In the above example I would want to select 101, 105, 107 and 111
> from
> > Table A. Can anyone give me a hand? Thanks in advance,
> >
> >
> > Dunc.
> >
> >
> >
> >
> > _________________________________________________________
> > DO YOU YAHOO!?
> > Get your free @yahoo.com address at http://mail.yahoo.com