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 |
|
muschamp
Starting Member
14 Posts |
Posted - 2008-04-09 : 12:18:56
|
| My table structure:Aircraft_Id(PK, nchar(25),not null)Service_Ceiling_ft (numeric(18,0), not null)My Data:Aircraft_Id Service_CeilingP_ftF-14 Tomcat 53000My Query:SELECT 'Aircraft_Id, 'Service_Ceiling_ft'FROM CombatWHERE 'Service_Ceiling_ft' > '51000'My result:(No column name) (No column name)Aircraft_Id Service_Ceiling_ft I'm not getting any error messages or data. Any advice would be a great help.thanksUS Navy - We are fueled, armed, and go for launch. |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-04-09 : 12:22:37
|
Remove quotes from around column names.SELECT Aircraft_Id, Service_Ceiling_ftFROM CombatWHERE Service_Ceiling_ft > 51000 Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-09 : 12:28:25
|
quote: Originally posted by muschamp My table structure:Aircraft_Id(PK, nchar(25),not null)Service_Ceiling_ft (numeric(18,0), not null)My Data:Aircraft_Id Service_CeilingP_ftF-14 Tomcat 53000My Query:SELECT 'Aircraft_Id, 'Service_Ceiling_ft'FROM CombatWHERE 'Service_Ceiling_ft' > '51000'My result:(No column name) (No column name)Aircraft_Id Service_Ceiling_ft I'm not getting any error messages or data. Any advice would be a great help.thanksUS Navy - We are fueled, armed, and go for launch.
why do you have quotes around column names? |
 |
|
|
muschamp
Starting Member
14 Posts |
Posted - 2008-04-09 : 12:31:05
|
| I wasn't getting an error message with them, and figured it must have been an issue with my database structure.Removing them from the SELECT row did work. Thanks for helping the newbie.ClintUS Navy - We are fueled, armed, and go for launch. |
 |
|
|
|
|
|
|
|