# \[sql\] - Single Quote in SQL Query

**URL:** <https://forum.kirupa.com/t/sql-single-quote-in-sql-query/240503>\
**Category:** programming\
**Created:** [October 3, 2007, 3:23pm UTC](https://forum.kirupa.com/t/sql-single-quote-in-sql-query/240503 "2007-10-03T15:23:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [October 3, 2007, 3:23pm UTC](https://forum.kirupa.com/t/sql-single-quote-in-sql-query/240503/1 "2007-10-03T15:23:52Z")

</div>

Hey all,

Running into a what I thought should be a small problem but it’s going on an hour and I still can’t figure it out :jail:

Reading an excel file and running queries on Sheet names. The problem is when there is a single quote in the sheet name.

example:

```auto

selectQuery = "SELECT * FROM Dave's Sheet"

```

It keeps bombing the query. Not matter what I try I can’t get this to work. I can’t replace the single quotes because then it can’t find the tab name. Any ideas?

Thanks
