Table of Contents

Search

  1. About the Data Vault SQL Reference
  2. Introduction to SQL Reference for Informatica Data Vault
  3. Date and Time Arithmetic
  4. WHERE Clauses
  5. UNION Operator
  6. Parameterized Query
  7. Functions

Data Vault SQL Reference

Data Vault SQL Reference

DIGITS

DIGITS

A cast function that returns a string representation of the numeric input expression, excluding non-digits. The input value's numeric sign, decimal point, and/or exponent character (if applicable) are not part of the return value. The length of the returned string is the precision of the input value, padded with leading zeroes if necessary.

DIGITS Syntax

DIGITS (decimal)

DIGITS Example

Input
Output
-123456.789
'0123456789'
CREATE TABLE dec1 (col1 DEC(10, 3)); INSERT INTO dec1 VALUES (-123456.789); 1 row affected CREATE TABLE varchar1 (c1 VARCHAR(10)); INSERT INTO varchar1(c1) SELECT DIGITS(col1) FROM dec1; 1 row affected SELECT c1 FROM varchar1; 1 row selected c1 ---------- 0123456789

0 COMMENTS

We’d like to hear from you!