add COPY component
This commit is contained in:
parent
2986bb85c2
commit
efd61f205a
@ -65,7 +65,7 @@ begin
|
|||||||
----------------------------------------------------add create table verbage in front of column list--------------------------------------------------------
|
----------------------------------------------------add create table verbage in front of column list--------------------------------------------------------
|
||||||
|
|
||||||
_t := format('CREATE TEMP TABLE csv_i (%s)', _t);
|
_t := format('CREATE TEMP TABLE csv_i (%s)', _t);
|
||||||
--raise notice '%', _t;
|
raise notice '%', _t;
|
||||||
|
|
||||||
|
|
||||||
----------------------------------------------------build the table-----------------------------------------------------------------------------------------
|
----------------------------------------------------build the table-----------------------------------------------------------------------------------------
|
||||||
@ -77,4 +77,8 @@ begin
|
|||||||
end
|
end
|
||||||
$$;
|
$$;
|
||||||
|
|
||||||
SELECT * FROM csv_i;
|
--SELECT * FROM csv_i;
|
||||||
|
|
||||||
|
COPY csv_i FROM 'C:\Users\ptrowbridge\downloads\transsearchcsv.csv' WITH (HEADER TRUE,DELIMITER ',', FORMAT CSV, ENCODING 'SQL_ASCII',QUOTE '"');
|
||||||
|
|
||||||
|
SELECT row_to_json(csv_i) FROM csv_i;
|
Loading…
Reference in New Issue
Block a user