Switch – Query Oracle


switch value di query oracle?? bisa-lah… check it dot.

SELECT program_id, 
        DECODE(customer_id,
               'AAL', 'American Airlines',
               'ILC', 'Intl. Leasing Corp.',
               'NWO', 'Northwest Orient',
               'SAL', 'Southwest Airlines',
               'SWA', 'Sweptwing Airlines',
               'USAF', 'U.S. Air Force') AIRLINE,
        delivered_date
 FROM airplanes

Semoga manfaat.

Info : psoug

http://psoug.org/reference/decode_case.html

About blackphp

All about programming php, ajax, jquery, mysql, etc, tips n trick. Now, i'm concern in php programming with codeigniter framework n also training my design skill with photoshop or corel... wish me luck! ('o')

Posted on April 21, 2012, in Oracle. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: