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 - 2002-10-15 : 08:24:59
|
| Harish writes "Here's a sample of what I am trying to do. SELECT * FROM CITYWHERE POPULATION > '2000'I want to introduce a column, YEAR in the result with a value '2002'. Any help would be appreciated." |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2002-10-15 : 08:31:53
|
| SELECT *, '2002' AS YEAR FROM CITY WHERE POPULATION > '2002'Sam |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-10-15 : 08:32:37
|
| HiTry this :SELECT * , 2002 AS [YEAR]FROM CITY WHERE POPULATION > '2000'Damian |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-10-15 : 08:33:51
|
Not bad, only 45 seconds faster (I'd say sniped, but it's in poor taste )Damian |
 |
|
|
|
|
|