Re: decode function in ingres
From: Gilgamesh Nootebos <gilgamesh_at_koekjes.net>
Date: 17 Feb 2003 11:44:12 -0600
Message-ID: <3E511D10.3040906_at_koekjes.net>
Date: 17 Feb 2003 11:44:12 -0600
Message-ID: <3E511D10.3040906_at_koekjes.net>
Hi krishna,
krishna wrote:
>Is there any function in Ingres which in equivalent to Decode function
>in oracle. all I want to do is print 'Y' for 1 and 'N' or 0. any
>function for this purpose?
>
>
There is no such function according to my knowlegde(which is adequate
for my day to day programming activities but not nearly as large as some
DBA's I know) but there is a trick we use on Ingres II 2.0(and should
work on earlier versions too) to create reports in a single table scan
without CASE expressions: select charextract('NY', 0 +
1),charextract('NY', 1 + 1) does what you want.
Good luck
Gilgamesh
-- Gilgamesh Nootebos _at_: gilgamesh_at_koekjes.net "You must realize that the computer has it in for you. The irrefutable proof of this is that the computer always does what you tell it to do."Received on Mon Feb 17 2003 - 18:44:12 CET