Code: Select all
set search_path=baseball;
DROP TABLE IF EXISTS HPLABS_DEMO.baseball.carss;
DROP SEQUENCE if EXISTS HPLABS_DEMO.baseball.house;
CREATE SEQUENCE house start 1;
CREATE TABLE HPLABS_DEMO.baseball.cars
(
SEQ_EVENTS numeric DEFAULT NEXTVAL('EVENT_SEQ') PRIMARY KEY,
c varchar(12) NOT NULL,
d VARCHAR(12) not null,
s int NOT NULL
);
copy HPLABS_DEMO.baseball.cars
(
c,
d,
s
)
FROM LOCAL 'C:\Users\KIWI\Desktop\cars.csv'
DELIMITER ','
NULL AS ''
DIRECT
;
Code: Select all
SET executed successfully
Execution time: 0s
(Statement 1 of 6 finished)
Table 'HPLABS_DEMO.baseball.cars' dropped
Execution time: 0s
(Statement 2 of 6 finished)
Sequence 'HPLABS_DEMO.baseball.house' dropped
Execution time: 0s
(Statement 3 of 6 finished)
Sequence 'house' created
Execution time: 0s
(Statement 4 of 6 finished)
Table 'HPLABS_DEMO.baseball.cars' created
Execution time: 0.01s
(Statement 5 of 6 finished)
0 row(s) affected.
copy executed successfully
Execution time: 0.03s
(Statement 6 of 6 finished)
Script execution finished
Total script execution time: 0.05s
The first is my script, the .csv file has columns correlating to the schema.
Does anyone know why it woun't add the rows?
any help would be excellent! thanks!