Re: SQL doubt Urgent !!!!

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 31 Aug 2001 00:03:27 +0200
Message-ID: <toteqoeetbo3cb_at_news.demon.nl>


"Jeferson" <jeff_es_at_bol.com.br> wrote in message news:4f558fba.0108301109.291e0a3d_at_posting.google.com...
> How to use the parameter Decode in SQL
>
> This is what I want.
>
> Old value New value
> A 5
> B 6
> R 10
> T 1
>
> if I write a single SQL
>
> Select Decode(position,'A',5) from table ;
>
> works fine, but how to do all the above table ?
>
> Jeferson
>
> Any Ideas would be great !

  • Check the syntax of the decode function in your sql language ref manual
  • use decode(position, 'A', 5 , 'B', 6 , 'R', 10 , 'T', 1 , any default value)

Was that so difficult?

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Fri Aug 31 2001 - 00:03:27 CEST

Original text of this message