display of datatypes [message #375258] |
Mon, 13 August 2001 11:11 |
Barry
Messages: 5 Registered: August 2001
|
Junior Member |
|
|
I'm trying to get details from a user's schema, but I want the datatype (if it's NUMBER for example) to return in the format NUMBER(4,2) or if the precision is 0, in the format NUMBER(4).
I attempted to do this through a DECODE such as this:
'NUMBER', DECODE (data_precision, NULL, 'NUMBER',
NUMBER(' || TO_CHAR(data_precision) || ',' || DECODE (TO_CHAR(data_scale), '0', '')
But I don't know what to put after that to show the precision should it not be 0.
Any ideas/suggestions will be most welcome
|
|
|