How to query table when table name has hyphen in Redshift Spectrum?

2.6k Views Asked by At

I am attempting to query a table that has a hyphen in it.

I have tried backticks and quotes (`, ', ") and they don't work.

Query

select * from hubspot.contacts__form-submissions

Error message:

Error running query: syntax error at or near "-" LINE 7: from hubspot.contacts__form-submissions ^

I don't have write permissions so I can't rename the table.

Any suggestions on how I can query this?

1

There are 1 best solutions below

1
On

Try

select * from hubspot."contacts__form-submissions";