Single quote:

J

js

Hi,
How to fix the query below? Thanks...

Single quote:
SELECT * FROM TABLE1 WHERE (((Ins.Sub)=('CHILDREN'S '))"
 
W

Wayne Morgan

"SELECT * FROM TABLE1 WHERE (((Ins.Sub)=(""CHILDREN'S""));"

Doubling the double quotes will leave a single double quote in the output.
This will allow for the apostrophe in the data. Your example had mismatched
quotes, double quote at the end, nothing to match it. I added one in front
of Select, but you may have one somewhere else that will match it. Also, is
Ins.Sub the name of a field in Table1? If so, I would recommend a change.
Having a period in the name when periods are used to separate table and
field names can cause you a problem; at the least, it is likely to cause
confusion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top