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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:57:51+00:00 2026-05-13T08:57:51+00:00

I have some queries being run in a java program that makes use of

  • 0

I have some queries being run in a java program that makes use of a PostgreSQL database and some parts of an old version of JDataStore (the parts used to interact with the database). Sometimes the queries are sent to the database twice from one execution of a query. What’s even more odd is that the first query sent is slightly different than the second, and is incorrect. For example:

First Query (incorrect)
SELECT b."construct_id", c."instance_id", a.SymbolName, c.Address AddressDecimal,
       c.Description, b.ConstructName, a.DeclarationType, a.Symbol_id,
       a.SymbolType_id, a.Construct_id, a.Leaf 
FROM tblSymbolDeclaration a, tblLanguageConstructName b, tblSymbolInstance c  
WHERE a.Construct_id = b.Construct_id and a.Symbol_id = c.Symbol_id
  and a.DeclarationType = 1 and a.Root = 1

Note the two fields at the start of that query, and the lack of the word ‘as’, compared with this:

Second Query (correct)
SELECT a.SymbolName, c.Address as AddressDecimal, c.Description, 
       b.ConstructName, a.DeclarationType, a.Symbol_id, a.SymbolType_id,
       a.Construct_id, a.Leaf 
FROM tblSymbolDeclaration a, tblLanguageConstructName b, tblSymbolInstance c 
WHERE a.Construct_id = b.Construct_id and a.Symbol_id = c.Symbol_id 
  and a.DeclarationType = 1 and a.Root = 1

We have a set list of queries we use, and the first query is not even in that list. What could cause this? (Sorry that I have provided no code, but it is not feasible to do so in this situation.)

  • 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-05-13T08:57:52+00:00Added an answer on May 13, 2026 at 8:57 am

    The query wouldn’t just “change” like that. I’m sure the field name “instance_id” isn’t being created in the ether. I think it is a mistake in the construction of the query itself.

    1. How is the query being constructed and passed to the database?
    2. Where are you seeing the “incorrect” query exactly?

    Ok, shot in the dark here, but try changing your query to this just for the sake of changing it. See what your server tells you then.

    String myQuery = ""
    + "SELECT a.symbolname, "
    + "       c.address AS addressdecimal, "
    + "       c.DESCRIPTION, "
    + "       b.constructname, "
    + "       a.declarationtype, "
    + "       a.symbol_id, "
    + "       a.symboltype_id, "
    + "       a.construct_id, "
    + "       a.leaf "
    + "FROM   tblsymboldeclaration a "
    + "       INNER JOIN tbllanguageconstructname b "
    + "         ON a.construct_id = b.construct_id "
    + "       INNER JOIN tblsymbolinstance c "
    + "         ON a.symbol_id = c.symbol_id "
    + "WHERE  a.declarationtype = 1 "
    + "       AND a.ROOT = 1";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 442k
  • Answers 442k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I don't believe anything magical is going on here. An… May 15, 2026 at 5:49 pm
  • Editorial Team
    Editorial Team added an answer This is the default in Visual Studio, and has been… May 15, 2026 at 5:49 pm
  • Editorial Team
    Editorial Team added an answer It's a Sphinx Bug. May 15, 2026 at 5:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.