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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:43:58+00:00 2026-05-27T15:43:58+00:00

I have a query that runs correctly from SQL Developer but bombs when attempting

  • 0

I have a query that runs correctly from SQL Developer but bombs when attempting to use it as a command-text query with parameters in Crystal Reports 2008.

The Query (hard-coded dates; runs correctly as Oracle Query and CR 2008 Command Text)

SELECT *
FROM   (SELECT PERSON.DISPLAYNAME AS NAME
               , LABOR.LA20       AS LABORRECEMPLOYEENUM
               , LABOR.LABORCODE  AS PERSONLABORCODE
        FROM   LABOR
               LEFT OUTER JOIN PERSON
                 ON ( LABOR.LABORCODE = PERSON.PERSONID )
        WHERE  LABOR.LA20 IS NOT NULL
               AND LABOR.ACTIVE = 1
               AND PERSON.DISPLAYNAME IS NOT NULL
               AND LOWER(PERSON.DISPLAYNAME) NOT LIKE '%kimball%'
               AND LOWER(PERSON.DISPLAYNAME) NOT LIKE '%electrico%'
               AND LOWER(PERSON.DISPLAYNAME) NOT LIKE '%misc labor cost adj%'
               AND LOWER(PERSON.DISPLAYNAME) NOT LIKE '%brossoit'
               AND LOWER(PERSON.DISPLAYNAME) NOT LIKE '%brossiot')PERSONINFO
       LEFT OUTER JOIN (SELECT *
                        FROM   LABTRANS
                        WHERE  LABTRANS.STARTDATE BETWEEN to_date('03/01/2011', 'mm/dd/yyyy') AND to_date('04/01/2011', 'mm/dd/yyyy')) REDUCEDLABORRANGE
         ON ( PERSONINFO.PERSONLABORCODE = REDUCEDLABORRANGE.LABORCODE )
WHERE  REDUCEDLABORRANGE.LABORCODE IS NULL; 

What I’d like to do

Replace the hard-coded values:

WHERE  LABTRANS.STARTDATE BETWEEN to_date('03/01/2011', 'mm/dd/yyyy') AND to_date('04/01/2011', 'mm/dd/yyyy')

With Crystal Reports parameters in command text.

What I’ve tried (and errors)

WHERE  LABTRANS.STARTDATE BETWEEN to_date({?BeginDate}, 'mm/dd/yyyy') AND to_date({?EndDate}, 'mm/dd/yyyy')

Yields the error: A non-numeric character was found where a numeric was expected [Database Vendor Code: 1858]

WHERE  LABTRANS.STARTDATE BETWEEN to_date('{?BeginDate}', 'mm/dd/yyyy') AND to_date('{?EndDate}', 'mm/dd/yyyy')

Yields the error: Missing Right Parenthesis [Database Vendor Code 907]

Potential Keys to the solution

  • I can’t figure out what Crystal is actually sticking into the parameter values, or how they’re passed on to the query.
  • 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-27T15:43:59+00:00Added an answer on May 27, 2026 at 3:43 pm

    And of course, soon after I post, I find the answer.

    I realize, I wasn’t trusting Crystal to put the dates in the proper format ahead of time (usually, not trusting Crystal Reports is the correct choice).

    The following worked:

    WHERE  LABTRANS.STARTDATE BETWEEN {?BeginDate} AND {?EndDate}
    

    No need to additionally format the date, as they are already in the proper format coming out of Crystal into Oracle.

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

Sidebar

Related Questions

I have a query that runs super fast when executed in the sql editor
I have a sql query that runs super fast, around one second, when not
I have a particular SQL query that seems to suffer from a mysterious performance
I have the following query that runs in my Oracle database and I want
I have a dynamic query that returns around 590,000 records. It runs successfully the
I have a Delphi 2009 application that runs a query over a database using
I have a php script that runs a mysql query, then loops the result,
I have a query that strips data from a XML string, inserts it into
I have a SQL query that is supposed to pull out a record and
We have an interesting table query (SQL Server 2008) that fails with a different

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.