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
 Selectin strange column names

Author  Topic 

deathrone
Starting Member

15 Posts

Posted - 2013-06-10 : 03:30:46
The column in the table is called <nr_ref,id>
how to select it ?

trololoolo

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2013-06-10 : 03:32:43
put the column Name between [].

select [nr_ref,id] from table


Too old to Rock'n'Roll too young to die.
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-10 : 03:33:52
SELECT [nr_ref,id]
FROM YouTable


--
Chandu
Go to Top of Page

deathrone
Starting Member

15 Posts

Posted - 2013-06-10 : 04:00:25
thx !

trololoolo
Go to Top of Page

deathrone
Starting Member

15 Posts

Posted - 2013-06-10 : 04:28:09
oh but, how to do it in ORACLE ?

trololoolo
Go to Top of Page

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-10 : 04:53:26
quote:
Originally posted by deathrone

oh but, how to do it in ORACLE ?

trololoolo


I think you can use double quotes in oracle
SELECT "nr_ref,id"
FROM TableName

--
Chandu
Go to Top of Page
   

- Advertisement -