A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/functions/to_object below:

Website Navigation


TO_OBJECT | Snowflake Documentation

TO_OBJECT

Converts the input value to an OBJECT:

Syntax Arguments
expr

An expression that evaluates to a VARIANT that contains an OBJECT.

Returns

The data type of the returned value is OBJECT.

Examples

This demonstrates simple usage of the TO_OBJECT function:

Create a table and insert a value of type VARIANT. (The function PARSE_JSON returns a VARIANT.)

CREATE TABLE t1 (vo VARIANT);
INSERT INTO t1 (vo) 
    SELECT PARSE_JSON('{"a":1}');

Copy

Call the TO_OBJECT function:

SELECT TO_OBJECT(vo) from t1;
+---------------+
| TO_OBJECT(VO) |
|---------------|
| {             |
|   "a": 1      |
| }             |
+---------------+

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4