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

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

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

View previous topic View next topic Go down

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

Post  maran on 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
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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