Friday, February 24, 2012

Extrating Data from One Database from Another

Hello,
I am new to sql (very new).
I have two database, let's call it database1 and database2.
Both database contains last name, first name and address information.
Database1 has approximatley 12000 records and database2 has approximately
2000 records. Here is what I am trying to accomplish. I will like to match
and extract data from database1 from database2 based on last name.
Thanks,
Steve,
select *
from database1.dbo.tbl t1
join database2.dbo.tbl t2
on t1,lastname = t2.lastname
"Steve" wrote:

> Hello,
> I am new to sql (very new).
> I have two database, let's call it database1 and database2.
> Both database contains last name, first name and address information.
> Database1 has approximatley 12000 records and database2 has approximately
> 2000 records. Here is what I am trying to accomplish. I will like to match
> and extract data from database1 from database2 based on last name.
> Thanks,
> Steve,

No comments:

Post a Comment