Tuesday, August 26, 2008

Dump (Expr, Return_Fmt, Start, Length)

Column Street_Address Format A25
Column Dump Format A30
Column Substr Format A10

Select Street_Address
-----------------------------------------------
, Substr(Street_Address,3,4) As Substr
-----------------------------------------------
, Dump(Street_Address /* Field or Expression */
, 3 /* ASCII Format */
, 3 /* Start in Position 3 */
, 4 /* Return 4 characters */
) As Dump
-----------------------------------------------
From HR.Locations
Where RowNum < 2;
Dump returns:
Return Formats: Common Types:
Typ=12 (Data Type)
Len=7: (Full Length of Column)
120,108 (Internal Representation)


3 ASCII (default)
8 Octal
10 Decimal
16 Hexadecimal
17 Single character
Typ=1 VARCHAR2
Typ=96 CHAR
Typ=2 NUMBER
Typ=12 DATE


STREET_ADDRESS            SUBSTR     DUMP
------------------------- ---------- ------------------------------
1297 Via Cola di Rie 97 V Typ=1 Len=20: 57,55,32,86
See Character Sets for a complete list of codes generated from DUMP.

No comments:

Post a Comment