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

  • SEARCH
  • Home
  • 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 8399953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:26:27+00:00 2026-06-09T21:26:27+00:00

I am trying to a run a query with several arrays so i would

  • 0

I am trying to a run a query with several arrays so i would have to create a query like

SELECT * FROM TABLE_NAME WHERE FIELD1 IN (?,?,?) AND FIELD2 IN(?,?,?) .... SO ON

so, every time i have to generate the number of ?’s based on the size of each array i have and put it there. It seems very old fashioned to me. are there any other ways of doing it? like directly insert an array of values.

I am using java v1.4. I saw something in 1.6 about creating sql arrays but nothing in 1.4

  • 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-09T21:26:28+00:00Added an answer on June 9, 2026 at 9:26 pm

    Short of any SQL builder library, you’re going to have to generate those multiple bind values yourself. Even with JDBC array support, this is generally not possible, specifically not for Sybase ASE, as far as I know.

    By SQL builder library, I mean something like jOOQ (of which I am the developer):

    String[]  array1 = {"1", "2", "3"};
    Integer[] array2 = { 1 ,  2 ,  3 };
    
    create.select()
          .from(TABLE_NAME)
          .where(FIELD1.in(array1))
          .and(FIELD2.in(array2))
          .fetch();
    

    Note that jOOQ requires Java 1.6

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

Sidebar

Related Questions

I am trying to run a query like this: SELECT lower (A.label) FROM addresses
I am trying to run the following query: SELECT COUNT(*) FROM ( SELECT *
I'm trying to run a query of the type SELECT * FROM table WHERE
I am trying to run the following script (unsuccessfully): $variables = $db->query(SELECT * FROM
I'm trying to run this query: SELECT COUNT(events.event_id) AS total_events, COUNT(matches.fight_id) AS total_matches, COUNT(players.fighter_id)
I have the following SQL query that I am trying to run inside Microsoft
I'm trying to run a query on DBPedia.org via SPARQL. Basically, here's what I
Hi I am trying to run this query in SQL but it is not
Hi i am trying to run a query on a database, but i keep
Hey guys I am getting this exception when trying to run the query Column

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.