
September 25th, 2003, 09:13 AM
|
|
Senior Member
|
|
Join Date: Sep 2003
Location: Canada
Posts: 305
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 10
|
|
|
Hi,
(1) You can specify alignment of a column value using SQL*Plus command:
for example in 'emp' table, you want column 'ename' to be appear right justified.
SQL>COLUMN ENAME JUSTIFY RIGHT
(2) DECODE funtion provides IF.... THEN.....ELSE implementation in SELECT statement. For example
SELECT Item#,
Ord_qty,
DECODE(Size,'S', 'Small', 'M',Medium', 'L', 'large'),
FROM Order_detail
/
If you are using Oracle9i then you can also use CASE....WHEN expression.
Regards
|