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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2007-01-15 : 11:07:37
|
| New to SQL writes "SQL SERVER 2005 VISUAL STUDIOI have two columns of data from two different tables.I need them combined in one,Column one Column twoLondon NullManchester NullKent NullNull LondonNull KentSo that when its null in column one it uses the data in column twoTHANKS" |
|
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-01-15 : 11:16:27
|
select coalesce(col1,col2) www.elsasoft.org |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-01-15 : 11:18:00
|
select isnull(ColumnOne, ColumnTwo) as CombinedColumnfrom MyTableGo with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-01-16 : 07:19:52
|
quote: Originally posted by AskSQLTeam I have two columns of data from two different tables.
If the data is in two tables, you must have some column telling which item number the city is, some sort of sort order.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|