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: Experts plese help me..

Re: Experts plese help me..

From: Darren Brock <brock_at_governet.net>
Date: Fri, 19 Nov 1999 13:37:21 -0700
Message-ID: <3835B501.BD7A84DF@governet.net>


Paul,

Good call. We don't know however, what exactly it is that he needs, so as far as I'm concerned we both gave good and valid answers to the question posed. If nothing else we gave him some options.

Darren

paul cluiss wrote:
>
> Darren,
>
> I suppose the real question is what Norazman means by "huge", but it sounds to me
> like it's soooooo big (or his processor is sooooooo slow) that he doesn't want to do
> it iteratively. If I were doing this I would at least try it the way you describe
> (using the linear search with a cursor) because it just may be fast enough. This
> would also give me something to which I can compare my other solution. From your
> response I'm getting the impression that you're thinking of processing all the rows
> in a single function call, and then stowing them in another table. At that point
> the job would be over. I, on the other hand, was envisioning a function which
> returns TRUE (found) or FALSE (not found), which would be called for some given
> "capital part number" each time a person looks up a part in an interactive fashion.
> I have worked on a couple of systems where one database contains most of the
> objects, but a good portion is contained in another database, so you need this kind
> of lookup scheme on a per-object basis. Maybe this isn't how it will be used, but
> if it is then he could code something like this:
>
> FUNCTION IsItThere (cpNum IN VARCHAR2)
> RETURN BOOLEAN
> IS
> prefix VARCHAR(32) := 'CP#' || TO_CHAR(cpNum) || '%';
> BEGIN
> select count(*) from the_table where the_column like prefix;
> EXCEPTION
> WHEN NODATAFOUND THEN
> return FALSE;
> END;
> return TRUE;
> END IsItThere;
>
> In such a situation I might just opt to normalize the database a bit.
>
> Paul Cluiss
> Dallas, Texas
>

--



  Darren Brock Oracle Developer/DBA
  Governet
  208-522-1225
  brock_at_governet.net
Received on Fri Nov 19 1999 - 14:37:21 CST

Original text of this message

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