Home All Groups Group Topic Archive Search About

How to compare two identical tables in VB.NET + MS Access

Author
12 Jul 2006 5:35 PM
himanshupundir
I have two identical tables, now I want to compare them and display the
results in a form which looks something like this...CaseID is primary
key and it is same for a case in both tables

Fieldname ----TableA-----TableB

CaseID         101        101
FirstName      John       John D
LastName       White      White
DOB            1-5-77     1-6-77

Thanks
HP

Author
12 Jul 2006 7:43 PM
vbnetdev
are both tables in the same database?

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



<himanshupun***@gmail.com> wrote in message
Show quoteHide quote
news:1152725736.410783.201090@b28g2000cwb.googlegroups.com...
>I have two identical tables, now I want to compare them and display the
> results in a form which looks something like this...CaseID is primary
> key and it is same for a case in both tables
>
> Fieldname ----TableA-----TableB
>
> CaseID         101        101
> FirstName      John       John D
> LastName       White      White
> DOB            1-5-77     1-6-77
>
> Thanks
> HP
>
Author
12 Jul 2006 7:59 PM
hp
Yes they are in same database but with different names.


vbnetdev wrote:
Show quoteHide quote
> are both tables in the same database?
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> <himanshupun***@gmail.com> wrote in message
> news:1152725736.410783.201090@b28g2000cwb.googlegroups.com...
> >I have two identical tables, now I want to compare them and display the
> > results in a form which looks something like this...CaseID is primary
> > key and it is same for a case in both tables
> >
> > Fieldname ----TableA-----TableB
> >
> > CaseID         101        101
> > FirstName      John       John D
> > LastName       White      White
> > DOB            1-5-77     1-6-77
> >
> > Thanks
> > HP
> >
Author
12 Jul 2006 7:59 PM
hp
Yes they are in same database but with different names.


vbnetdev wrote:
Show quoteHide quote
> are both tables in the same database?
>
> --
> Get a powerful web, database, application, and email hosting with KJM
> Solutions
> http://www.kjmsolutions.com
>
>
>
> <himanshupun***@gmail.com> wrote in message
> news:1152725736.410783.201090@b28g2000cwb.googlegroups.com...
> >I have two identical tables, now I want to compare them and display the
> > results in a form which looks something like this...CaseID is primary
> > key and it is same for a case in both tables
> >
> > Fieldname ----TableA-----TableB
> >
> > CaseID         101        101
> > FirstName      John       John D
> > LastName       White      White
> > DOB            1-5-77     1-6-77
> >
> > Thanks
> > HP
> >
Author
12 Jul 2006 9:04 PM
vbnetdev
Do an inner join and compare the fields. Since the fields are of the same
name you will need ot alias one of the columns.

Link on inner joins....

for SQL http://www.w3schools.com/sql/sql_join.asp

For Access
http://www.databasejournal.com/features/msaccess/article.php/3516561



--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quoteHide quote
"hp" <himanshupun***@gmail.com> wrote in message
news:1152734394.569119.10070@b28g2000cwb.googlegroups.com...
> Yes they are in same database but with different names.
>
>
> vbnetdev wrote:
>> are both tables in the same database?
>>
>> --
>> Get a powerful web, database, application, and email hosting with KJM
>> Solutions
>> http://www.kjmsolutions.com
>>
>>
>>
>> <himanshupun***@gmail.com> wrote in message
>> news:1152725736.410783.201090@b28g2000cwb.googlegroups.com...
>> >I have two identical tables, now I want to compare them and display the
>> > results in a form which looks something like this...CaseID is primary
>> > key and it is same for a case in both tables
>> >
>> > Fieldname ----TableA-----TableB
>> >
>> > CaseID         101        101
>> > FirstName      John       John D
>> > LastName       White      White
>> > DOB            1-5-77     1-6-77
>> >
>> > Thanks
>> > HP
>> >
>