|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi!
I have a little problem...hope anyone can help me with this. There is 2 tables: - In the first table there is a column named "name" (of course there is more columns with adress an so on), many rows have the same data. - In the second table there is one column named "nickname" and one named "id". - The "name" and "id" columns have the same data. I want to make a query that takes out the "name" column in the first table and replaces that data with the data from the "nickname" column, so everyone with name "name"="id" should have the nickname instead. Anyone understand what I'm trying to do?! /Nicke: ![]() |
|
#2
|
|||
|
|||
|
It is a simple join.
Select b.nickname, a.address, a.otherInfo From table1 as a inner Join table2 as b on a.name = b.id correct me if that's not what you mean. |
|
#3
|
|||
|
|||
|
Thank you.
That whas exactly what I ment. Now I'm going to study a little about joins... /Nicke ![]() |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Help with a query! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|