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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:38:44+00:00 2026-05-11T17:38:44+00:00

Take this query: SELECT * FROM MyTable WHERE MyColumn = ‘SomeValue’ ORDER BY SomeFakeQualifier.MyColumn

  • 0

Take this query:

  SELECT *
    FROM MyTable
   WHERE MyColumn = 'SomeValue'
ORDER BY SomeFakeQualifier.MyColumn DESC

It seems that SqlServer just ignores the qualifier in this case. Should you add a JOIN, then it will consider it.

This really isn’t an issue, until you want to make your queries viable across DBMS vendors. Oracle, for instance, will complain, rightfully so, that the qualifier is invalid.

Yes, we use an ORM which eliminates a lot of this, but we still need JDBC for some actions (it’s the nature of our product and its support for dynamic queries). In fact, it is because of this that this issue came up – someone copied a JPA named query to a JDBC-provided query, but left in the object name instead of the table name.

So I suppose the question is: has anyone else come across this? If so, what’s the best way to test your code to ensure it will work across the “main three” DBMS’s (SqlServer, Oracle, DB2)? We have a QA team, but there seems like there should be a better way to unit test for these idiosyncrasies.

Note, we always try to enforce the writing of ANSI SQL to avoid issues, but some things, like the aforementioned issue, can slip through

I hope this makes sense. I can provide more context if necessary.

TIA

  • 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-11T17:38:45+00:00Added an answer on May 11, 2026 at 5:38 pm

    Your solution here is really unit tests of your queries combined with continuous integration. You have queries in the form of JDBC code. It’s easy enough to write unit tests to connect to your relevant databases and run the queries in such a manner that you at least see if they execute, even if you don’t care about the results, which is the standard you’re talking about.

    Arguably you can extend this to measure the performance and/or the results but I find these sorts of tests are extremely fragile and tend to break very, very quickly as more changes inevitably happen.

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

Sidebar

Related Questions

I am using a 3rd-party rotator object, which is providing a smooth, random rotation

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.