• sureshrk19
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi,

I'm facing problem having subquery.

Here is my query:

---------
QueryResult query = binding.query("select Title, "
    + " from ContentVersion v where "
    + "v.ContentDocumentId = '(select id from contentdocument c where c.latestpublishedversionid like \'<somevalue>%\')'");
 ----------

I tried couple other approaches to escape '%' but, no luck.

no viable alternative at character '%'  is the error I see on execution.

Did I miss anything?

Thanks,
Suresh

Hi,

I'm facing problem having subquery.

Here is my query:

---------
QueryResult query = binding.query("select Title, "
    + " from ContentVersion v where "
    + "v.ContentDocumentId = '(select id from contentdocument c where c.latestpublishedversionid like \'<somevalue>%\')'");
 ----------

I tried couple other approaches to escape '%' but, no luck.

no viable alternative at character '%'  is the error I see on execution.

Did I miss anything?

Thanks,
Suresh