Re: [Q] SQL question
Posted in 1995
I think that what you need is a SELECT ... from contractors where
status="IN" UNION SELECT ... from visitors where status="IN".
> Is there a way for me to get a select statement to bring fields from two
> tables by a common select criteria?
> > e.g
> Select lname, fname, status
> from contractors, visitors
> where status ="IN"> > I know this does not work. It gives me a cartesian product. I have
been > exploring different methods but I don't get the required result.
The two
> tables have the same for the columns, and the criteria, which is
STATUS > ="IN" is common to both. I just want to combine the info from
the two > tables so that I can report it.
> > Can I make a TEMP table, should I insert rows and populate the temp >
table? Can I load one table into another?
> > Any help would be appreciated, thanks in advance.
> > -- > Saqib Mausoof
> --------------------------------------------------------------------
> I have a hard enough time speaking for myself, so speaking on behalf
> of my employer is out of the question.
> >
Malcolm Weallans
Online Database Consultancy
Phone 01628-72154
Fax 01628-37463
CIX - onlinedbc