• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can't find records in Oracle?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't find records in Oracle?


  • Subject: Can't find records in Oracle?
  • From: Marc Respass <email@hidden>
  • Date: Tue, 16 May 2006 16:14:35 -0400

Hi All,

My app cannot find records that exist using the fetch spec that I have. I develop locally using OpenBase and then move the app to our test box using Oracle. My fetch spec is

((payDate = $payDate) and ((sent = 0) or (sent = nil)) and ((objectCode = $code1) or (objectCode = $code2)))

I turned on eo debugging and see the SQL below generated which returns zero rows. When I simplify the SQL and submit it manually, I get the results I expect.

What is with RTRIM and RPAD? Could that have anything to do with it? Does anyone have any idea what's happening?

Thanks a lot
Marc

=== EO Generated
SELECT t0.AMOUNT, RTRIM(t0.CASE_TYPE_CLASS), RTRIM (t0.CASE_TYPE_OTHER), RTRIM(t0.CLIENT_NAME), RTRIM (t0.CLIENT_TYPE_OTHER), RTRIM(t0.DOC_ID), RTRIM(t0.DOCKET_NUM), t0.ACCOUNT_ID, t0.CASE_TYPE_ID, t0.CLIENT_TYPE_ID, t0.COURT_ID, t0.VENDOR_ID, RTRIM(t0.OBJECT_CODE), t0.PAY_DATE, t0.SENT, t0.TRAVEL_AMOUNT FROM ACCOUNT t0 WHERE ((t0.SENT = ? OR t0.SENT is NULL) AND (t0.OBJECT_CODE = RPAD(?, 15) OR t0.OBJECT_CODE = RPAD(?, 15))) ORDER BY t0.PAY_DATE ASC" withBindings: 1:0(sent), 2:"4040"(objectCode), 3:"4040"(objectCode)


=== Simplified
SELECT * FROM ACCOUNT t0
WHERE (t0.SENT = 0 OR t0.SENT is NULL) AND (t0.OBJECT_CODE = '4040' or t0.OBJECT_CODE = '4040')
ORDER BY t0.PAY_DATE ASC _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Can't find records in Oracle?
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: refreshing the defaultEditingContext
  • Next by Date: Re: Can't find records in Oracle?
  • Previous by thread: Re: headers question
  • Next by thread: Re: Can't find records in Oracle?
  • Index(es):
    • Date
    • Thread