Query to tables having special characters

Hi.

I have working query on postgre, but when I trying to use it in PQ, I get an error:

SELECT cast((TO_TIMESTAMP((SELECT "END_DATE" FROM 
"AO_60DB71_SPRINT" 
where "RAPID_VIEW_ID"=3343 and "STARTED" = 't' and "COMPLETE_DATE" is NULL) / 1000)) as date)

Stack Trace

org.postgresql.util.PSQLException: ERROR: syntax error at or near "'AO_60DB71_SPRINT'" Position: 54 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:615) at 

1 answer

1 accepted

Hi Artashes,

Thanks for you question! Does this also happen if you remove the double quotes?

SELECT cast((TO_TIMESTAMP((SELECT END_DATE FROM
AO_60DB71_SPRINT
where RAPID_VIEW_ID=3343 and STARTED = 't' and COMPLETE_DATE is NULL) / 1000)) as date)

Regards, Felix (Scandio)

Felix, Hi!

 

I solved the problem as follows for postgre:

SELECT DATE(TO_TIMESTAMP((SELECT "END_DATE"  FROM "AO_60DB71_SPRINT" where "RAPID_VIEW_ID"=3343 and "STARTED" = 't' and "COMPLETE_DATE" is NULL)/1000));


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 3 hours ago in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

17 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you