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: Extracting values to right of strings? Regex?

Re: Extracting values to right of strings? Regex?

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Tue, 21 Aug 2007 16:59:00 -0700
Message-ID: <1187740740.291248.211990@q3g2000prf.googlegroups.com>


On Aug 21, 5:18 pm, jobs <j..._at_webdos.com> wrote:
> Hello, oracle noob here.
>
> I've got a function that returns a string that looks like this
>
> ---- begin
> <yyyy>
> <xxxx">ACCEPT - The transaction succeeded.
>
> Merchant Reference Code:610015
> Request ID: 1877300000090176174087
> Authorized Amount: 5.00
> Authorization Code: 123456
> Authorization Time: 2007-08-21T21:01:39Z
> --- end
>
> What's the best way in Oracle to return values for some of these
> strings?
>
> for example, If the string contains the string "ACCEPT - " , set
> variable status to true, esle false
>
> variable amount = numeric to the right of Authorized Amount, so
> amount = 5.00
>
> Thanks for any help or information!

What version and edition of Oracle?

To whom or what is Oracle to return these values too?

The answer of how to return the data depends on how the data is going to be used and the tool to which the data is being returned. Do you need the entire string returned or just the values for the merchant_code, the requrest_id, etc...?

You have one definite numeric and one definite date/time variable but the two numeric digit items are unlikely to be used in math operations so the values are really just character data.

I would suspect that financial transaction data of this type should follow an official format standard perhaps defined by a credit card transaction processor.

HTH -- Mark D Powell -- Received on Tue Aug 21 2007 - 18:59:00 CDT

Original text of this message

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