I have a table with 6 columns including a varchar (that I want to fill with a constant), a timestamp and 5 bigints.
The input file is a CSV where the varchar field is not included (ie, the table has 7 columns, the CSV has 6 columns).
My COPY looks like
COPY task_stats (
task_name as 'ADD_DEALER',
sample_time as to_date(sample_time,'DD-MON-YYYY HH:SS'),
response as response,
count as count,
max as max,
min as min,
over4 as over4
)
FROM 'ADD_DEALER.CSV' DELIMITER ',' NULL '' SKIP 4 DIRECT;
A sample input row from the CSV appears as
5-JUL-2013 09:30, 500, 1, 500, 500, 0
When I run the load (in a script) I get the following error:
stms-> \i load_task_stats.sql
vsql:load_task_stats.sql:11: ERROR 3457: Function to_date(timestamp, unknown) does not exist, or permission is denied for to_date(timestamp, unknown)
HINT: No function matches the given name and argument types. You may need to add explicit type casts
What am I missing?
The column name in the table is sample_time and is of datatype timestamp.
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Stable