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: Sybase vs Oracle - which is better?

Re: Sybase vs Oracle - which is better?

From: <j2brown_at_my-dejanews.com>
Date: 1998/12/20
Message-ID: <75hq09$5fi$1@nnrp1.dejanews.com>#1/1

You don't even need a CASE statement. If you're clever, you can **simulate** a case statement with Abs(), Patindex(), ASCII(), etc. even back in version 4.9x.

e.g. Select 0.5*Patindex(A.condition_expression,'Y') +

             1.0*Patindex(A.condition_expression,'N')

Regards,
J

In article <748bi5$ibf$1_at_mach.vub.ac.be>,   luc van der veurst <lucv_at_uranus.az.vub.ac.be.> wrote:
> In comp.databases.sybase denny_vk_at_my-dejanews.com wrote:
> .....
> : > UPDATE tablename as A
> : > SET fieldname = (select
> : > sum(B.fieldname)*decode(A.condition_expression,'Y',0.5,1)
> : > FROM tablename2 B
> : > where B.fkey = A.key)
> : > WHERE <some further restrictions>;
 

> : Remember Sybase does not have decode or user defined functions.
>
> Sybase has a CASE expression. I'm not that familiar with the
> decode function, but I think that Sybase's CASE expression provides
> at least the same functionallity as the decode function.
>
> --
> Luc.
>
> ______________________________________________________________________
> Luc Van der Veurst ISUG President
> Academic Hospital, VUB http://www.isug.com
> Laarbeeklaan 101, 1090 Brussels, Belgium
> 32 - 2 477 69 80
> lucv_at_az.vub.ac.be
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Sun Dec 20 1998 - 00:00:00 CST

Original text of this message

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