Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Query errors because field name contains - character

$
0
0

Hi,

I have a table with a field called 'notes-id', however if I do a query such as:

select * from PUB_oa_sltrans  where notes-id = '00712518118'

I get the following errors:

Msg 207, Level 16, State 1, Line 1
Invalid column name 'notes'.
Msg 207, Level 16, State 1, Line 1
Invalid column name 'id'.

Is there any way I can write this query so I don't get errors?

Cheers

Paul


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>