Afternoon ehaerim, On 09/06/12 02:16, ehaerim wrote: > thx it works again! > > but when it comes to INTEGER or SMALLINT type, it won't work again. > for example,
It seems, unfortunately, that the set width command only affects character columns. I've done a few tests with other data types and it has no effect on those. You may need to cast the numeric columns to character to get the desired result: SQL> select a from norm; A ============ 1 10 100 1000 SQL> set width a 5; SQL> select a from norm; A ============ 1 10 100 1000 SQL> select cast (a as varchar(10)) as a from norm; A ===== 1 10 100 1000 Problem is, now you lose the right justification normally given to numerics. :-( Cheers, Norm. PS. I thought there was a corresponding "set numwidth a 5" command. I eventually remembered that that is in Oracle - set numwidth 5. -- Norman Dunbar Dunbar IT Consultants Ltd Registered address: Thorpe House 61 Richardshaw Lane Pudsey West Yorkshire United Kingdom LS28 7EL Company Number: 05132767