Seems i dont know how to use it.
Hi !
I'm having 2 tables. The first one containes 2 rows which i get wherby importing a text file. It has all the information i need except Phone numbers.
The other one contains 100000 rows and contains all the clients plus their telephones.
I want to add table 1 the missing tel.numbers whereby using "left join". In both tables i dont use primary keys !
I get temp table containing at least 100000 rows !!!
I want only 2 rows, thosee of table 1 + phone number imported from table 2.
Can any one tell me whats wrong with my "left join" ?
Could it be the lack of primary key ? Is there a remedy to the lack of Primary key assuming this is the problem?
Thanks a lot !
Hi !
I'm having 2 tables. The first one containes 2 rows which i get wherby importing a text file. It has all the information i need except Phone numbers.
The other one contains 100000 rows and contains all the clients plus their telephones.
I want to add table 1 the missing tel.numbers whereby using "left join". In both tables i dont use primary keys !
Code:
select
a.lastname,
b.phone1
into
temp
from
table1 as a left join table2 as b
on
a.lastname=b.lastname
I want only 2 rows, thosee of table 1 + phone number imported from table 2.
Can any one tell me whats wrong with my "left join" ?
Could it be the lack of primary key ? Is there a remedy to the lack of Primary key assuming this is the problem?
Thanks a lot !