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

Home -> Community -> Mailing Lists -> Oracle-L -> Locking question

Locking question

From: John McCabe <johnm9563_at_netscape.net>
Date: 13 Oct 00 10:37:06 PDT
Message-Id: <10648.119219@fatcity.com>


HI all:

Is there an easy solution to this :

I have one process that has not committed and is holding a lock on a reco= rd. =

Process #2 wants to update the same record. Is there any way to tell pr= ocess
#2 to only wait X amount of time before returning an error or have the er= ror
returned immedialty? In other words if the record is locked, I do not wa= nt
process #2 to wait until it is unlocked, I want to tell it how long to wa= it,
then give me an error.

thanks =



Get your own FREE, personal Netscape WebMail account today at http://home= =2Enetscape.com/webmail

 From: L <leed_at_chele.cais.net>
 Date: Fri, 13 Oct 2000 13:36:34 -0400 (EDT)  Subject: SUMMARY: [Q] ORACLE date select problem?

Thank you for the answers. I receive so many answer and I tried most of them. Here is SUMMARY.

A lot answers said "this is Y2K problem". It is NOT. It is string comparison problem.

The following answer NOT work under my testing:

  alter session set nls_date_format='dd-mon-yyyy';
  alter session set nls_date_format='dd-mon-RRRR';
  alter session set nls_date_format='dd-mon-RR';
  where datestamp < to_date('31-DEC-96','DD-MON-YY');   where trunc(datestamp) < '31-DEC-96'

The sql work with my testing:

where datestamp < to_Date('31-DEC-1996','dd-mon-yyyy') where to_char(datestamp','YYYYMMDD') < '19961231'

My original posting:

> On ORACLE 7.3.4 database, I tried to select date less than "31-DEC-96".
> the following statement does NOT work correctly:
>
> select account_id, datestamp from table1
> where to_char(datestamp,'DD-MON-YY') < '31-DEC-96';
>
>
> It still print date like '21_JAN-98'.
>
> Anyone can give me a hint?
>
>
> Thanks
>


 From: David Peasley <david_at_adams.edu>
 Date: Fri, 13 Oct 2000 11:39:25 -0600
 Subject: Re: [Q] ORACLE date select problem?

Using the century pivot date format doesn't automatically guarantee y2k compliance... it's really sort of a half baked fix that assumes any relevant dates are going to be no more than 50 years away from the turn of the century, so your application would drive the decision whether or not to use this (a database of nursing home resident's demographic data comes to mind as an example of where century pivot date formatting would probably NOT be a good idea :). The only way to be absolutely sure would be to use the to_date function, like so:

   select account_id, datestamp from table1    where datestamp < to_date('31-DEC-1996','DD-MON-YYYY);

David Peasley
Database Administrator
Adams State College
Alamosa, CO 81102
david_at_adams.edu

"Hsu, Anthony C., ,CPMS" wrote:

> Before you run the SELECT query
> try to run:
> ALTER SESSION SET NLS_DATE_FORMAT='DD-MON-RRRR'
> then you will have Y2K compliance session.
>
> -----Original Message-----
> Sent: Friday, October 13, 2000 11:35 AM
> To: Multiple recipients of list ORACLE-L
>
> On ORACLE 7.3.4 database, I tried to select date less than "31-DEC-96".
> the following statement does NOT work correctly:
>
> select account_id, datestamp from table1
> where to_char(datestamp,'DD-MON-YY') < '31-DEC-96';
>
> It still print date like '21_JAN-98'.
>
> Anyone can give me a hint?
>
> Thanks
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: L
> INET: leed_at_chele.cais.net
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Hsu, Anthony C., ,CPMS
> INET: anthony.hsu_at_cpms.osd.mil
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
Received on Fri Oct 13 2000 - 12:37:06 CDT

Original text of this message

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