473,395 Members | 2,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Conversion of CASE into DEcode

Hello everyone,

[COLOR=Red]Please HELP !!!!![/COLOR]

I'm facing problem in converting CASE statements into DECODE. As i have PL/SQL 8i, so it does not handle CASE statements. Please send me the solutions . Then basic problem is the CASE has NOT condition i.e. <> ...... and this particularly i'm not able to convert in DECODE.

Please send me the solution as early as possible.. I'm stuck up !!!
I'm giving below the CASE statements and the DECODE statements which i have written and which have some problem.....

CASE statrement is:-

CASE
WHEN SUBSTR (CIL_GET_ACCOUNT_SEGS (ACD.CODE_COMBINATION_ID), 17, 7) <> '0032682'
THEN ACD.ACCTD_AMOUNT * -1
ELSE 0
END SERVICE_TAX

the DECODE which i wrote is :-

DECODE(SUBSTR (CIL_GET_ACCOUNT_SEGS (ACD.CODE_COMBINATION_ID), 17, 7) <> '0032682'),(ACD.ACCTD_AMOUNT* -1), 0) SERVICE_TAX


CASE statement:-

CASE
WHEN SUBSTR (CIL_GET_ACCOUNT_SEGS (ACD.CODE_COMBINATION_ID), 17, 7) <> '0032682'
THEN 'Service Tax 10%'
ELSE 'Cess- Ser tax2%'
END TAX_CODE

DECODE i wrote:

DECODE((SUBSTR (CIL_GET_ACCOUNT_SEGS (ACD.CODE_COMBINATION_ID), 17, 7) <> '0032682'), 'Service Tax 10%', 'Cess- Ser tax2%') TAX_CODE

Please let me know what is correct DECODE statement......
Sep 2 '05 #1
0 3477

Sign in to post your reply or Sign up for a free account.

Similar topics

14
by: Dylan | last post by:
Here's what I'm trying to do: - scrape some html content from various sources The issue I'm running to: - some of the sources have incorrectly encoded characters... for example, cp1252...
8
by: CAFxX | last post by:
i'm writing a program that executes some calculations on a bitmap loaded in memory. these calculation ends up with pixel wth values far over 255, but i need them to be between 0 and 255 since i...
3
by: Michael Hill | last post by:
Is this a valid sql statement: SELECT case field1 when 'first' then 1 when 'second' then 1 else null end FROM mytable
3
by: Q. John Chen | last post by:
It should be easy but I am not familier with javascript. I have a string that is encoded simply by replacing the letter with the next letter in the alphabeta. I need a function to convert it...
1
by: richasaraf | last post by:
Hello everyone, I'm facing problem in converting CASE statements into DECODE. As i have PL/SQL 8i, so it does not handle CASE statements. Please send me the solutions . Then basic problem is the...
6
by: msdnuniv | last post by:
Hello everybody, since days i try to convert Unicode-Strings in VB.NET to ANSI which should be processable in VB6 and converted to unicode again. It should be possible with any codepage, e.g....
4
by: aki | last post by:
i am receiving a packet from network and it contains many fields , starting from code, idetifier ...., i want to read the code field which is of size 1 byte. checking the code value i need to go...
9
by: thijs.braem | last post by:
Hi everyone, I'm having quite some troubles trying to convert Unicode to String (for use in psycopg, which apparently doesn't know how to cope with unicode strings). The error I keep having...
1
by: Eric S. Johansson | last post by:
I'm having a problem (Python 2.4) converting strings with random 8-bit characters into an escape form which is 7-bit clean for storage in a database. Here's an example: body =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.