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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 SELECT Statement Fails

Author  Topic 

petek
Posting Yak Master

192 Posts

Posted - 2008-07-31 : 05:42:12
Hi All,

i have a problem with a select statement or shall i say a problem with column names i am trying to use the following:


select tblSource.NMO(G) >7,
tblSource.NMO(G) <7,
tblSource.NMO(G)E&I,
tblSource.NMO(G) ELR,
tblSource.NMO(G) Specialist Ops,
tblSource.Misc Trainee,
tblSource.Misc Assisstant,
tblSource.Misc Repair: Mains & Services,
tblSource.Misc Mainetnance Operative,
tblSource.Depot,
tblSource.EUSR ID

from tblsource

the column names are causing me a probelm how can i run the select statement??

Kind Regards

Pete.

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-07-31 : 05:46:05
use square brackets

like...

select table.[any old column name]

Em
Go to Top of Page

petek
Posting Yak Master

192 Posts

Posted - 2008-07-31 : 05:50:28
Thanks for the quick reply

can i use select table."any old column name"


Kind Regards

Pete.
Go to Top of Page

petek
Posting Yak Master

192 Posts

Posted - 2008-07-31 : 05:52:58
both work but will use square brackets thankyou

Kind Regards

Pete.
Go to Top of Page
   

- Advertisement -