Vince Teachout <> wrote:
> I've gotten into a bad habit that I've been doing for a few years
> now, and just happened to be thinking about it while reading profox,
> so thought I'd ask:  
> 
> I often have the need to select all records from a file where 3 (to
> make it easy) fields are the same as 3 fields in another file.  I do
> it like so:  
> 
> Select * from fileA where store_no+slsper+division in (Select
> store_no+slsper+division from fileB) 
> 
> I KNOW that's not right, but what is the correct syntax?  Thanks.

The syntax is fine that everyone gave.  Just make sure your indexs are alike
between the tables.


Stephen Russell
DBA / .Net Developer

Memphis TN 38115
901.246-0159

"Our scientific power has outrun our spiritual power. We have guided
missiles and misguided men." Dr. Martin Luther King Jr.

http://spaces.msn.com/members/srussell/

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.3/531 - Release Date: 11/12/2006
 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to