*
The moose likes JDBC and the fly likes Doubt on '#' in query. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Doubt on Watch "Doubt on New topic
Author

Doubt on '#' in query.

dhwani mathur
Ranch Hand

Joined: May 08, 2007
Posts: 621
hi All

i am trying to get data from excel sheet
in java using jdbcodbcdrivers,but i am interested
in getting data based on particular field in Excel sheet
not all the data ,so i simply used query as below


till here it works fine.

but my code gets stuck if excel sheet has data field like


So here i am getting SQl Exception as Syntax error in date in query expression 'Phone#'.
if i change in Excel sheet Phone# to Phone then data gets imported
so i need some info onto how can i overcome this problem
of using '#' in a query if any excel sheet field has such value
because i cant keep changing excel sheet fields.


Any help on the above will be great

Thanks in advance.


Dhwani:>Winning is not important but it is the only thing.
 
Don't get me started about those stupid light bulbs.
 
subject: Doubt on '#' in query.
 
Similar Threads
Files processing on server
Jdbc with MS-excel
reading excel file using jdbc [help me]
problem while reading data from excel sheet
Reading excel file with data in chinese language using jdbc