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: Select only if two character and two number

Re: Select only if two character and two number

From: Sashafay <afayfman_at_mwh.com>
Date: 2 Jul 2002 19:54:23 -0700
Message-ID: <a13f8a22.0207021854.51c41a81@posting.google.com>


rsarwar_at_ifsna.com (Rauf Sarwar) wrote in message news:<c2d690f2.0207011819.5867e810_at_posting.google.com>...
> Daniel Morgan <dmorgan_at_exesolutions.com> wrote in message news:<3D207850.3C76D4A5_at_exesolutions.com>...
> > Sashafay wrote:
> >
> > > I looking for the function (or some other trick) to identify new input
> > > in the table, that will be a combination of two character and two
> > > number only. But I don't know how to recognize if these input that
> > > what I looking for. In that field user can input any values (ex.
> > > &#8216;ABCD' or &#8216;1234') but I want only first and second characters and
> > > third and fourth numbers (ex. &#8216;AB12').
> > >
> > > Thanks in advance,
> > > Alex
> >
> > I suspect English not being your first language is interfering with your
> > ability to state the problem. But based on my understanding of what you
> > have posted there is not way of identifying records in the manner you
> > suggest. I would suggest posting the table structure and a few rows of
> > data (some new and some old) that will demonstrate what the difference is
> > between old and new records.
> >
> > Generally when I want to do something like this I add a column to the
> > table something like this:
> >
> > ALTER TABLE xyz
> > ADD (new_flag NUMBER(1) DEFAULT 1);
> >
> > This will automatically insert a one '1' into the new_flag column with
> > every insert.
> >
> > Then have your process update the field to 0 as you process the rows.
> >
> > Daniel Morgan
>
>
> I think you need to elaborate a bit more on what you are trying to do
> and what values you are looking for. It is easy to identify a new
> insert via a boolean flag of 1 or 0, 1 being new insert and 0 being
> processed. However, I don't know what exactly you mean by ABCD, 1234
> and AB12. If you could provide some more detail...maybe someone can
> help you.
>
> By what I understand, looks like you would need to use INSTR and
> SUBSTR functions in a loop to parse out your field values by Alpha or
> numeric types.
>
> HTH
> //Rauf Sarwar

Thanks guys, who really helped me with the answer! Received on Tue Jul 02 2002 - 21:54:23 CDT

Original text of this message

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