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 |
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-08-20 : 14:16:26
|
| table a id group value1 g1 22 g1 33 g2 44 g2 55 g2 10table b gourp nameg1 n1g1 n2g2 n4g2 n5I want ret table look like1 g1 2 n11 g1 2 n22 g1 3 n12 g1 3 n23 g2 4 n43 g2 4 n54 g2 5 n44 g2 5 n55 g2 6 n45 g2 6 n4How can I fulfill this task, thanks.Jeff |
|
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-08-20 : 14:21:21
|
| sql server 2000thanks |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-20 : 14:23:50
|
SELECT a.ID, a.Group, a.Value, b.NameFROM TableA AS aINNER JOIN TableB AS b ON b.Group = a.Group E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-20 : 14:25:47
|
And anORDER BY 1, 2, 3, 4 at the end of the query. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
jeff06
Posting Yak Master
166 Posts |
Posted - 2007-08-21 : 11:01:49
|
| Thank you very much,Peso! |
 |
|
|
|
|
|