SQL> SELECT CITY,REPLACE(CITY,'I','Z')

  2  FROM EMPLOYEE_TBL;

CITY            REPLACE(CITY,'I','Z')

--------------- ---------------------

GREENWOOD       GREENWOOD

INDIANAPOLIS    ZNDZANAPOLZS

WHITELAND       WHZTELAND

INDIANAPOLIS    ZNDZANAPOLZS

INDIANAPOLIS    ZNDZANAPOLZS

INDIANAPOLIS    ZNDZANAPOLZS

6 rows selected


SQL> SELECT CITY,SUBSTR(CITY,1,3)

  2  FROM EMPLOYEE_TBL;

CITY            SUBSTR(CITY,1,3)

--------------- ----------------

GREENWOOD       GRE

INDIANAPOLIS    IND

WHITELAND       WHI

INDIANAPOLIS    IND

INDIANAPOLIS    IND

INDIANAPOLIS    IND

6 rows selected


SQL> SELECT POSITION,LTRIM(POSITION,'SALES')

  2  FROM EMPLOYEE_PAY_TBL;

POSITION        LTRIM(POSITION,'SALES')

--------------- -----------------------

MARKETING       MARKETING

TEAM LEADER     TEAM LEADER

SALES MANAGER    MANAGER

SALESMAN        MAN

SHIPPER         HIPPER

SHIPPER         HIPPER

6 rows selected


SQL> SELECT POSITION,RTRIM(POSITION,'ER')

  2  FROM EMPLOYEE_PAY_TBL;

POSITION        RTRIM(POSITION,'ER')

--------------- --------------------

MARKETING       MARKETING

TEAM LEADER     TEAM LEAD

SALES MANAGER   SALES MANAG

SALESMAN        SALESMAN

SHIPPER         SHIPP

SHIPPER         SHIPP

6 rows selected


SQL> SELECT CITY,

  2         DECODE(CITY, 'INDIANAPOLIS', 'INDY', 'GREENWOOD', 'GREEN', 'OTHER')

  3    FROM EMPLOYEE_TBL;

CITY            DECODE(CITY,'INDIANAPOLIS','IN

--------------- ------------------------------

GREENWOOD       GREEN

INDIANAPOLIS    INDY

WHITELAND       OTHER

INDIANAPOLIS    INDY

INDIANAPOLIS    INDY

INDIANAPOLIS    INDY

6 rows selected


SQL> SELECT PAGER,NVL(PAGER,99999999)

  2  FROM EMPLOYEE_TBL;

PAGER      NVL(PAGER,99999999)

---------- -------------------

           99999999

           99999999

3175709980 3175709980

8887345678 8887345678

           99999999

           99999999

6 rows selected


SQL> 

SQL> SELECT LPAD(PROD_DESC,30,'.') PRODUCT

  2  FROM PRODUCTS_TBL;

PRODUCT

--------------------------------------------------------------------------------

.....................KEY CHAIN

.................OAK BOOKSHELF

.................WITCH COSTUME

.......PLASTIC PUMPKIN 18 INCH

..........FALSE PARAFFIN TEETH

..............LIGHTED LANTERNS

.............ASSORTED COSTUMES

....................CANDY CORN

.................PUMPKIN CANDY

...............PLASTIC SPIDERS

................ASSORTED MASKS

11 rows selected


SQL> 

SQL> SELECT RPAD(PROD_DESC,30,'.') PRODUCT

  2  FROM PRODUCTS_TBL;

PRODUCT

--------------------------------------------------------------------------------

KEY CHAIN.....................

OAK BOOKSHELF.................

WITCH COSTUME.................

PLASTIC PUMPKIN 18 INCH.......

FALSE PARAFFIN TEETH..........

LIGHTED LANTERNS..............

ASSORTED COSTUMES.............

CANDY CORN....................

PUMPKIN CANDY.................

PLASTIC SPIDERS...............

ASSORTED MASKS................

11 rows selected


SQL> SELECT ASCII('A') FROM DUAL;

ASCII('A')

----------

        65