Structured Query Language - C993 Conversion Functions

Structured Query Language - C993 Conversion Functions

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

TO_DSINTERVAL

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (11)

Section 1

(11 cards)

TO_DSINTERVAL

Front

Syntax: TO_DSINTERVAL (sql_format, nls_parms) Parameters: sql_format is a character string in the format required for the INTERVAL DAY TO SECOND data type, which is 'DAYS HH24:MI:SS.FF'. For example, '15 14:05:10.001' is the INTERVAL DAY TO SECOND representation for 15 days, 14 hours, 5 minutes, and 10.001 seconds. The nls_parms value is the same parameter you saw earlier with the TO_NUMBER function.

Back

TO_YMINTERVAL

Front

Syntax: TO_YMINTERVAL ('y-m') Parameters: y and m are numbers contained within a string (required).

Back

TO_TIMESTAMP

Front

Syntax: TO_TIMESTAMP (c, format_model, nls_parms) Parameters: c is a character data type (required); format_model must define the format of c corresponding to TIMESTAMP format model elements (optional). The default requirement is that c must be in the TIMESTAMP format. The nls_parms value is the same parameter you saw earlier with the TO_NUMBER function

Back

TO_DATE

Front

Syntax: TO_DATE(c, format_model, nls_parms) Parameters: c = a character string (required); format_model is a format model according to Table 6-3. The nls_parms value is the same parameter you saw earlier with the TO_NUMBER function.

Back

TO_CHAR — DATE

Front

Syntax: TO_CHAR(d, format_model, nls_parms) Parameters: d is a date or a date interval (required). The parameter format_model is optional and can be used to format data in a variety of ways.

Back

TO_NUMBER

Front

Syntax: TO_NUMBER(e1, format_model, nls_parms) Parameters: e1 is an expression (required); format_model is the optional format model. See Table 6-1 for a complete list of elements that make up the format model.

Back

CAST

Front

Syntax: CAST(e AS d) Parameters: e is an expression; d is a data type.

Back

TO_CHAR — CHARACTER

Front

Syntax: TO_CHAR(c) Parameters: c is either an NCHAR, an NVARCHAR2, a CLOB, or an NCLOB.

Back

NUMTOYMINTERVAL

Front

Syntax: NUMTOYMINTERVAL (n, interval_unit) Parameters: n = number (required). interval_unit = one of the following values: 'YEAR' or 'MONTH'.

Back

TO_TIMESTAMP_TZ

Front

Syntax: TO_TIMESTAMP_TZ(c, format_model, nls_parms) Parameters: c is a character string (required). The format_model value must define the format of c corresponding to TIMESTAMP WITH TIME ZONE format model elements (optional). The default requirement is that c must be in the TIMESTAMP format. The optional nls_parms value is the same parameter you saw earlier with the TO_NUMBER function.

Back

NUMTODSINTERVAL

Front

Syntax: NUMTODSINTERVAL (n, interval_unit) Parameters: n = number (required). interval_unit = one of the following: 'DAY', 'HOUR', 'MINUTE', or 'SECOND'.

Back