0

I am getting the following error running this PostgreSQL query. Can anyone tell me how to correct this query?

SQL error:

ERROR:  syntax error at or near "fitacf_data"
LINE 1: ...fitacf_data.num_pts, EXTRACT(EPOCH FROM TIMESTAMP fitacf_dat...
                                                             ^
SELECT fitacf_data.file_date, fitacf_data.num_pts, EXTRACT(EPOCH FROM TIMESTAMP fitacf_data.time), fitacf_data.stcode FROM fitacf_data WHERE fitacf_data.file_date BETWEEN '2017-04-14 00:00:00' AND '2017-04-14 23:59:59' AND fitacf_data.stcode = 'pgr';

1 Answer 1

1

If fitacf_data.time already is a timestamp leave the TIMESTAMP keyword away, that's for literals.

...
EXTRACT(EPOCH FROM fitacf_data.time)
...
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.