Skip to main content
Solved

quote in InlineQuerier

  • July 16, 2015
  • 2 replies
  • 7 views

endest
Contributor
Forum|alt.badge.img+1
Hi,

 

 

I want to query records of table A where the value of X contain value of Y in table B:

 

select * from A,B where X LIKE '%Y%'

 

It output nothing, I think the problem is the quote make Y into a normal string.

 

 

How to solve this?

 

 

Thanks

 

 

Best answer by takashi

Hi,

 

 

Characters within single quotes will be interpreted literally. I think this statement generates your intended result.

 

-----

 

select * from A,B where X like '%'||Y||'%'

 

-----

 

 

Takashi
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • Best Answer
  • July 16, 2015
Hi,

 

 

Characters within single quotes will be interpreted literally. I think this statement generates your intended result.

 

-----

 

select * from A,B where X like '%'||Y||'%'

 

-----

 

 

Takashi

endest
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • July 16, 2015
Hi,

 

 

Thank you, Takashi. It works.

 

 

I just find the search result of Knowledge Center is different from Communit Answers. I didn't find your last answer when I search with the toolbar of Knowledge Center.