PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Join the forum, it's quick and easy

PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).
PMS Information Systems
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SQL TIP: UPDATE THE PARTICULAR COLUMN WITH ANY ONE OF SEVERAL VALUES USING CASE

Go down

SQL TIP: UPDATE THE PARTICULAR COLUMN WITH ANY ONE OF SEVERAL VALUES USING CASE   Empty SQL TIP: UPDATE THE PARTICULAR COLUMN WITH ANY ONE OF SEVERAL VALUES USING CASE

Post  maran Mon May 16, 2016 11:15 pm

SQL TIP: UPDATE THE PARTICULAR COLUMN WITH ANY ONE OF SEVERAL VALUES USING CASE  
               
EXAMPLE:
       UPDATE SALES SET COMM = CASE DEPTID
                        WHEN 10 THEN COMM * 5
                        WHEN 15 THEN COMM * 7
                        WHEN 20 THEN COMM * 9
                        END
maran
maran
Admin

Posts : 442
Join date : 2009-07-24

https://pmsinformationsystem.forumotion.net

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum