Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to accommodate special character '?' in a column name in Hive

avatar
New Contributor

I have a query where as per the requirement the column name should be 'abc xyz?'. I am using tilted quotes to accommodate the space and special characters in between column name but i am getting the below error with '?':

 

Parameters cannot be used with normal Statement objects, use PreparedStatements instead.

 

I am using SQL Workbench for connecting to Hive. 

1 ACCEPTED SOLUTION

avatar
Super Guru

I would highly recommend to not use special characters in columns names.  Per documentation hive .13 (link) `column?name` should work with Hive,  however, there is no gauruntee that other clients, including SQL Workbench will allow this when the special character can be considered a code like character ($ % & ? " , . etc)

 

 

View solution in original post

2 REPLIES 2

avatar
Super Guru

I would highly recommend to not use special characters in columns names.  Per documentation hive .13 (link) `column?name` should work with Hive,  however, there is no gauruntee that other clients, including SQL Workbench will allow this when the special character can be considered a code like character ($ % & ? " , . etc)

 

 

avatar
New Contributor

Thankyou Steven 🙂