|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Q. about a couple of oracle commands
hi all,
got a couple of 'how to' questions about a couple of oracle commands. First one is how do u get items in a column that you have produced from a select statement to be aligned to the right. Second, is it possible to rename an item in a report that you have produced. For example if in the table that you created the report off, there is a column called head size and the values in that column are either S,M,L. but in the report u want those values to appear as Small, Medium,Large. thanks, waz. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
BTW, The CASE....WHEN expression is also available in 8.1.6.
Cheers, Dan |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Q. about a couple of oracle commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|