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.
| Author |
Topic |
|
alexjamesbrown
Starting Member
48 Posts |
Posted - 2009-01-09 : 09:10:48
|
Hi,Currently, we have a users table with a schema like:UserID | UserName 1 | alexjamesbrown2 | johnsmith3 | jobloggsWe then have a table (we'll call this profile for the sake of this..) with a schema like:User | HairColour | FavouriteFood1 | Brown | Pizza2 | Blonde | Pasta3 | Brown | PizzaWhat i need to do is replace the User column in the Profile table with the actual user name, stored in the users tablesomething like...update rating set creator = (SELECT username from dbo.Users where ID = ???) Thanks for your help |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-01-09 : 09:31:09
|
| All you need is only for displayselect u.username,p.HairColour,p.FavouriteFood from users as u inner join profiles as pon u.userid=p.userMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|