Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Forms: problem with parameter

Re: Forms: problem with parameter

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 12 Aug 1999 11:14:51 GMT
Message-ID: <37b6ac2f.59428233@newshost.us.oracle.com>


A copy of this was sent to "Dirk Bellemans" <Dirk.Bellemans_at_skynet.belgium> (if that email address didn't require changing) On Thu, 12 Aug 1999 08:27:51 +0200, you wrote:

>Steve Cosner wrote in message <7nfltr$3p4$1_at_nntp.csufresno.edu>...
>
>>It does not matter how the field is formatted. When you build the
>>where clause, the client's default date format is used unless you
>>specify the format. Try this:
>>
>>sql_stat := 'WHERE CALIBRACAO.PROXIMA BETWEEN To_date('''
>> ||to_char(:DATE_BLOCK.START_PLAN,'YYYYMMDD')
>> ||''',''YYYYMMDD'') AND To_date('''
>> ||to_char(:DATE_BLOCK.END_PLAN,'YYYYMMDD')
>> ||''',''YYYYMMDD'')'
>> ||' ORDER BY CALIBRACAO.PROXIMA';
>>
>>Steve Cosner
>
>You'll loose the index when using functions. This may have disastrous
>results on the query time...
>

In this case though the will not. the where clause is:

where DATABASE_COLUMN between f(x) and f(y)

f(x) and f(y) are based on constants from the form and return the same type as the database column. An index on DATABASE_COLUMN can and most likely would be used to satisfy this query.

>Isn't is possible to change the date format for the duration of the session?

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Aug 12 1999 - 06:14:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US