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

Home -> Community -> Usenet -> c.d.o.server -> Re: Concatenating and copying columns data

Re: Concatenating and copying columns data

From: Usman <khanusman_at_gmail.com>
Date: 9 Apr 2007 06:33:23 -0700
Message-ID: <1176125603.315614.90210@y80g2000hsf.googlegroups.com>


Yes, this is the tiny part of the bigger business task. I have mentioned the problem in best possible words. I don't have time to go through literature and will be glad if someone suggests something to get me going.

Thanks,
Usman

On Apr 9, 6:17 pm, "Michel Cadot" <micadot{at}altern{dot}org> wrote:
> "Usman" <khanus..._at_gmail.com> a écrit dans le message de news: 1176122339.134140.32..._at_n76g2000hsh.googlegroups.com...
> | Hi,
> |
> | I am a newbee to Oracle SQL programming. I have a problem where I have
> | three columns, A - varchar, B-varchar and C-numeric
> |
> | Column A can contain alphanumeric character.
> | Column B will always contain numeric characters.
> |
> | I need to write a trigger that will on every row inserted,
> |
> | 1. Check if column A exists then,
> | 2. If 1 is true, convert each alphabet in column A to its equivalent
> | ASCII and leave the numeric characters as it is. Therefore, for
> | example if I have 'A567', I should have 67567 as an end result,
> | assuming ascii code of 'A' is 67.
> | 3. Concatenate converted string in 2 above with data inserted in
> | column B.
> | 4. Convert to number/long in 3 above and store the data in column C.
> |
> | Example:
> |
> | column A = 'A567'
> | column B= '1234'
> | column C = 675671234
> |
> | Can anyone please help me implementing this logic?
> |
> | Any help in this regard will be appreciated.
> |
> | Thanks in anticipation,
> | Usman
> |
>
> To add to my answer in cdom: don't multipost.
>
> Regards
> Michel Cadot
Received on Mon Apr 09 2007 - 08:33:23 CDT

Original text of this message

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