On Wed, 30 Sep 2009, Joe Bennett wrote:

> Have two tables that have the same columns, but different number of rows
> (rows do not match but columns do. 86 matching columns in each table):

   That's to be expected; why would the rows match?

> Now, I'm looking to do this:
>
> Find the first row of data in TableB, take Column1 and Column2's data from
> row one and see if that data exists in TableA. Something like this: SELECT
> * FROM TableA WHERE Column1=Row1Data AND Column2=Row1Data.

   It appears that you want the INTERSECT operator; it finds the set of all
rows in two tables based on common columns. It removes duplicates.

   This is a standard SQL operation (after all, SQL is a language designed to
work with sets). See Section 15.4 (Combining With INTERSECT) in Rick van der
Lans's "The SQL Guide to SQLite" or the equivalent section in his
"Introduction to SQL, 4th Edition."

Rich

-- 
Richard B. Shepard, Ph.D.               |  Integrity            Credibility
Applied Ecosystem Services, Inc.        |            Innovation
<http://www.appl-ecosys.com>     Voice: 503-667-4517      Fax: 503-667-8863
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to