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
 General SQL Server Forums
 New to SQL Server Programming
 Re:Update

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-29 : 08:13:24
Jagadeesh writes "I have tables called "A" and "B" ,there is no relationship between to tables,i just wants to update values in table "B" by using values in table "A"."

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-29 : 08:39:27
How are you supposed to do that, when there are no relationship between the two tables?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-11-29 : 08:46:13
What is this? a circus?

Be sensible in what you ask!

update x
set b = a
from table1 cross join table2 b




Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-29 : 09:28:09
quote:
Originally posted by AskSQLTeam

Jagadeesh writes "I have tables called "A" and "B" ,there is no relationship between to tables,i just wants to update values in table "B" by using values in table "A"."


You cant. If you meant appending data

Insert into B(cols)
Select cols from A

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -