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

CHAR

CHAR

A cast function that converts the input value to the CHAR datatype equivalent and returns the value. DATE and TIME values are converted according to the picture format in the nucleus.ini file, unless a second parameter that specifies a particular date or time picture (between quotation marks) is included.

CHAR Syntax

CHAR (char) CHAR (char [, ‘picture format’]) CHAR (timestamp [, ‘picture format’])

CHAR Examples

Input
Output
'2004-01-31', 'mmmm dd, yyyy'
'January 31, 2004'
1000 + 200 + 30 + 4
'1234'
CREATE TABLE string_table (col1 VARCHAR(20)); CREATE TABLE date_table (c1 DATE); INSERT INTO date_table VALUES ('2004-01-31'); 1 row affected INSERT INTO string_table SELECT CHAR(c1, 'mmmm dd, yyyy') FROM date_table; 1 row affected INSERT INTO string_table VALUES (CHAR(1000+200+30+4)); 1 row affected SELECT * FROM string_table; 2 rows selected COL1 -------------------- January 31, 2004 1234

0 COMMENTS

We’d like to hear from you!