By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

convertion of query from mysql to postgresql is not working

P: 1
I have a query in MySQL and I want to use it in Postgresql 9.3 but some functions don't exist in Postgresql!
The code is this:

Expand|Select|Wrap|Line Numbers
  1. CAST(CONCAT(TIMESTAMPDIFF(HOUR, ss.datahoralimite, ss.datahorasuspensaosla), 'h',
  2.                                                                                               TIMESTAMPDIFF(MINUTE, ss.datahoralimite + INTERVAL TIMESTAMPDIFF(HOUR, ss.datahoralimite,  ss.datahorasuspensaosla) HOUR , ss.datahorasuspensaosla), 'm') AS CHAR)

Expand|Select|Wrap|Line Numbers
  1. CAST(CONCAT(TIMESTAMPDIFF(HOUR, ss.datahoralimite, coalesce(ss.datahorafim, CURRENT_TIMESTAMP)), 'h ',
  2.                                                                                               TIMESTAMPDIFF(MINUTE, ss.datahoralimite + INTERVAL TIMESTAMPDIFF(HOUR, ss.datahoralimite,  coalesce(ss.datahorafim, CURRENT_TIMESTAMP)) HOUR , coalesce(ss.datahorafim, CURRENT_TIMESTAMP)), 'm') AS CHAR)
Can anyone help me please???????
Sep 15 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.