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 7837755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:50:04+00:00 2026-06-02T14:50:04+00:00

I am firing two select queries via jdbc PreparedStatement , the queries are seperated

  • 0

I am firing two select queries via jdbc PreparedStatement ,
the queries are seperated by
semi-colon(the default seperator),
and it gives me the following error

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘select inq.preffered_date as ‘dom’ , inq.id from assigned_inquiries ai join inqu’ at line 1

select inq.preffered_date as ……… is where the second query begins.

Edit-> the query

select
    ms.next_date_of_meeting as 'dom',
    ms.inquiry_id as 'id'
from
    assigned_inquiries ai,
    meeting_status ms
where
    ai.representative_id = 1
    and (
        ai.status = 'postponed'
        or ai.status = 'remeeting'
    )
    and ai.inquiry_id = ms.inquiry_id
    and ms.next_date_of_meeting between '2012-1-1' and '2012-12-31'
    and ms.created_on = (select max(created_on) from meeting_status where inquiry_id = ms.inquiry_id);

select
    inq.preffered_date as 'dom',
    inq.id
from
    assigned_inquiries ai
    join inquiry inq on ai.inquiry_id = inq.id
where
    ai.representative_id = 1
    and ai.status = 'new'
    and inq.preffered_date between '2012-1-1' and '2012-12-31';

Is it possible to execute two queries at a time.
Help Please.

  • 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-02T14:50:05+00:00Added an answer on June 2, 2026 at 2:50 pm

    You can execute several statements at once with MySQL. However, this feature is disabled by default. To enable it, use the property allowMultiQueries. See the MySQL documentation for JDBC driver for more information: http://dev.mysql.com/doc/refman/5.5/en/connector-j-reference-configuration-properties.html

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

Sidebar

Related Questions

Will the following two queries be executed in the same way? SELECT COUNT(*) from
I made a little Shooter game with two ships firing at each other. I
Can anyone explain why the alert() in the following JavaScript code is firing? It
I am trying to alternate between two logos every 5 seconds using the following
If two children have the same parent, how does an event firing from one
I have two buttons that were firing functions once clicked on. jQuery was handling
I'm firing off tasks using an ExecutorService, dispatching tasks that need to be grouped
The onFocus event keeps firing on page load and doesn't seem to work when
How can I prevent the firing of multiple events of the same kind triggered
My UITextView delegate methods aren't firing. UILabel *fieldLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 290,

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.