Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

decode Bug?

Aketi JyuuzouJun 12 2006 — edited Jun 15 2006
SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Prod
PL/SQL Release 10.1.0.2.0 - Production
CORE	10.1.0.2.0	Production
TNS for 32-bit Windows: Version 10.1.0.2.0 - Production
NLSRTL Version 10.1.0.2.0 - Production
SQL> select decode(Col1,null,Col2,Col1) as Col3,
  2  case when decode(Col1,null,Col2,Col1) >= TO_DATE('2006-08-01', 'YYYY-MM-DD')
  3       then 1 else 0 end as "whereIsTrue"
  4  from (select TO_DATE('2006-08-12', 'YYYY-MM-DD') as Col1,null as Col2 from dual
  5        union select null,TO_DATE('2006-08-13', 'YYYY-MM-DD') from dual
  6        union select null,TO_DATE('2006-08-14', 'YYYY-MM-DD') from dual)
  7  ;

COL3      whereIsTrue
--------  -----------
06-08-12            1
06-08-13            1
06-08-14            1
SQL> select decode(Col1,null,Col2,Col1) as Col3,
  2  case when decode(Col1,null,Col2,Col1) >= TO_DATE('2006-08-01', 'YYYY-MM-DD')
  3       then 1 else 0 end as "whereIsTrue"
  4  from (select TO_DATE('2006-08-12', 'YYYY-MM-DD') as Col1,null as Col2 from dual
  5        union select null,TO_DATE('2006-08-13', 'YYYY-MM-DD') from dual
  6        union select null,TO_DATE('2006-08-14', 'YYYY-MM-DD') from dual)
  7  WHERE decode(Col1,null,Col2,Col1) >= TO_DATE('2006-08-01', 'YYYY-MM-DD')
  8  ;

COL3      whereIsTrue
--------  -----------
06-08-12            1

Why one recode?

Comments

Umer
yes, programming language does not matter if you want to store/retrieve data from a smart card.
safarmer
You have many options for accessing a smartcard including PC/SC readers, USB NFC readers, winscard.dll on Windows with DotNet, VC++ etc. There are also bindings for Python and Ruby to talk to a smart card.

In the end, all you do is pass a byte stream to a reader through its driver and it will respond with a byte stream. The language you use does not matter.

- Shane
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 13 2006
Added on Jun 12 2006
5 comments
2,085 views