Yes that was a typo
the query is

select decode(mod(column1,2),0,column2,column3) from
table_for_example;

the error message says inconsistent data types.

Regards,
Sonty

On Jun 26, 4:02 pm, rob wolfe <rob.wo...@oraclegeeks.com> wrote:
> And just in case the "from dual' in your original post was a typo and
> not what you really did ... when you say "simply fails" what is the
> error message?
>
>
>
> karthic M wrote:
> > @ saurabh......
> >           you just change the table name from dual to
> > table_for_example which you have given below.........
> > example:
> > select decode(mod(deptno,2),0,dname,loc) from dept;
>
> > All d best...
> > karthic M
> > On Fri, Jun 26, 2009 at 4:15 PM, sonty <saurabh.zen...@gmail.com
> > <mailto:saurabh.zen...@gmail.com>> wrote:
>
> >     Hi Guys,
>
> >     I have a table
>
> >     table_for_example
> >     ------------------------
> >     column1      number
> >     column2      varchar2(100)
> >     column3      long
>
> >     now my query is ,
>
> >     select decode(mod(column1,2),0,column2,column3) from dual;
>
> >     It simply fails, why??
>
> >     What is the way to achieve the desired result?
>
> >     Br,
> >     Sonty
>
> > --
> > karthic.M- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to