Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 insert query required!!

Author  Topic 

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2002-10-05 : 03:27:41
I have the following table structure

table x table y
Id Id
Name


there are a few thousand rows in both the tables.Now I have to add the field Name in table Y with corresponding names from the table x with the respective entries to Id in x and y.
is there any way to insert name in Y using a cursor???

Thxs

Harsh.

Nazim
A custom title

1408 Posts

Posted - 2002-10-05 : 03:49:06
update y set name=x.name from x inner join
y
on x.id=y.id

HTH

-------------------------
What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson
Go to Top of Page
   

- Advertisement -