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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Need some direction

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_ft
F-14 Tomcat 53000


My Query:
SELECT 'Aircraft_Id, 'Service_Ceiling_ft'
FROM Combat
WHERE '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.

thanks

US 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_ft
FROM Combat
WHERE Service_Ceiling_ft > 51000



Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

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_ft
F-14 Tomcat 53000


My Query:
SELECT 'Aircraft_Id, 'Service_Ceiling_ft'
FROM Combat
WHERE '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.

thanks

US Navy - We are fueled, armed, and go for launch.


why do you have quotes around column names?
Go to Top of Page

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.

Clint

US Navy - We are fueled, armed, and go for launch.
Go to Top of Page
   

- Advertisement -