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

Home -> Community -> Usenet -> c.d.o.misc -> SQL DECODE issue where search field is Like and not specific

SQL DECODE issue where search field is Like and not specific

From: Peter Stephen Drage <Peter.Drage_at_caveman.co.uk>
Date: Fri, 2 Jul 1999 11:21:29 +0100
Message-ID: <7li3vr$h5j$1@supernews.com>


The problem is that when using a decode statement the search seems to have to be specific i.e. 1,2,etc. I am searching on the fact that a contract ends with M,H,Q,Y and the result will depend upon only the ending . I have entered the decode statement :-
decode((Contract),'%Q',(Line*4),'%M', (Line*12),'%H', (Line*2),'%Y',(Line),0)
I get results all of the default 0
I have also tried %'M' and Like '%M'
I have checked the company's Oracle SQL training manuals, specific cases are all that are covered.
The only other time that I have used decode is when the search is specific but this has now got me baffled
Comments and suggestions greatly appreciated Thanks

J Received on Fri Jul 02 1999 - 05:21:29 CDT

Original text of this message

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