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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:14:37+00:00 2026-05-16T20:14:37+00:00

I built a small query tool for Oracle using OracleCommand and OracleDataAdapter. Users just

  • 0

I built a small query tool for Oracle using OracleCommand and OracleDataAdapter. Users just input a full query (no parameters), execute and the results are shown in a datagridview. So far so good, although I tried an invalid query, e.g.:

SELECT * FROM mytable WHERE dateColumn = '1-JAN-10'

This query is not valid SQL for Oracle. You have to use the to_date() function to compare with date literals. SQL developer also rejects it, but somehow my query tool just works. Does that mean my OracleCommand is a bit of a wizard here or am I doing something wrong? Also is there a way to omit this behavior because the purpose of the tool is testing queries, which should work always…

Thanks

  • 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-16T20:14:38+00:00Added an answer on May 16, 2026 at 8:14 pm

    The query may be valid for Oracle. You don’t have to use to_date() if you give the date string in your session’s date format, though it’s generally better to do that anyway to avoid issues like this.

    It sounds like you have a different NLS_DATE_FORMAT in your tool’s environment to that in SQL Developer, or the session date format is being set implicitly by OracleCommand.

    You can select value from nls_session_parameters where parameter = 'NLS_DATE_FORMAT' to see what it is from SQL*Plus and SQL Developer, and from your tool; and from nls_database_parameters to see which is overriding the database default.

    Looks like your tool may have DD-MON-RR and you’re expecting some other format elsewhere, but without checking those tables it’s hard to say where you’re using the database default and where you’re overriding it at session level. I’d guess that is the DB default though and you have an override in your other environments.

    From SQL Developer, try alter session set nls_date_format='DD-MON-RR'; and then re-run your invalid query – should work there too.

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

Sidebar

Related Questions

So far I've only built small graphical applications, using swing and JComponents as I
I built a small cms for personal websites using Rails. Each site has a
I have built an ERP for a small company using MS-Access (front end) and
Using PHP.. I have a small app that I built that currently uses a
using several codes available throughout the site, I built a small application that would
I recently built a small app for my site that allows my users to
I'm playing around with django and built a small app where a user can
Initially I thought it was a CSS issue but I built a small sample
I have a small issue with sessions. I have built a small shopping cart-esque
I have a small RIA that I built as a learning/make-my-life-easier project that uses

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.