Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7907061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:15:07+00:00 2026-06-03T11:15:07+00:00

I am working on IBM Websphere Message Broker v6.0 and writing a message flow

  • 0

I am working on IBM Websphere Message Broker v6.0 and writing a message flow in ESQL. I am using passthru to fire a select query on database.

Now the problem is passthru uses ‘ to start and end its parameter string. And we use ‘ in SQL to denote constants – something like WHERE T1.col1 = ‘Y’. So when I am using ‘ in the passthru parameter it is considering it as teh end of the string.

Here is the ESQL code:

SET result1 = passthru ('select CASE WHEN T2.X_FLG = 'Y' AND (SELECT D2.RGN FROM V1.X AS D2
WHERE D2.DLR = V.DLR AND (D2.RGN = '500' OR D2.RGN = '600')) FROM V1
<left join all the tabels>');

Now the problem is passthru parameter string ends in first ‘ that is just before Y – the parameter to database select query. ESQL compiler is giving me compiler error saying its a syntax error.

Is there some character which ahs to be appended before ‘ so that to recognise it as the charater ‘ and not as end of string to passthru?? Something like \’ or /’ ? I have tried all this but nothing seems to work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T11:15:08+00:00Added an answer on June 3, 2026 at 11:15 am

    Figured it out! There is another clause (should I say) which allows us to pass the constant values to the SQL statement and that is written after the ‘ of the SQL query completes. The places where we need the constant values should have ? and it marks the places for insertion. The insertion takes in the order we place the constant values in the “values” tag. So, the above passthru query can be written as:

    SET result1 = passthru ('select CASE WHEN T2.X_FLG = ? AND (SELECT D2.RGN FROM V1.X AS D2
    WHERE D2.DLR = V.DLR AND (D2.RGN = ? OR D2.RGN = ?)) FROM V1
    <left join all the tables>' to Database.{datasource_name} values('Y','500','600');
    

    Remember, the ? should not be enclosed in the brackets.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got everything setup and working for MQTT now. I am using the IBM
Hey all, Im working in IBM Websphere ILOG JRules 7.0 using RuleStudio (modified Eclipse)
Working on a website that has Employee and Branch entities, using a database table
I'm working with IBM Rational Application Developer for WebSphere ; it is based on
I am using WebSphere Application Server v7.0 with Eclipse helious 3.6.2, it was working
I'm using IBM RAD as the IDE and Websphere Application Server v6.0 to deploy
I'm trying to get an IBM tutorialworks example working but until now there hasn't
I am working with an IBM Maximo database that issues workorders automatically. When the
Working on joining up two legacy DB systems into new database where I can
I have a Websphere Portal application containing several portlets for which I'm currently working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.