2

I've explored this forum fairly extensively trying to get answers as to why my SQL isn't working. I need help with the timestamp on a torque map. I've used the following formula, obviously changing the three variables, and it always comes up with an error message.

  UPDATE tablename set yearColumn = to_timestamp(yr_compl,'YYYY’)

My old column is a string and my new column is in date.

I'm a complete novice.

3

I would say that the query is totally perfect, except for something that seems a typo :-)

In your query, the last quote for 'YYYY' is not a regular quote, which might be raising a syntax error. Try fixing it instead:

UPDATE tablename SET yearColumn = to_timestamp(yr_compl,'YYYY')

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.