473,463 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

convertion of query from mysql to postgresql is not working

Hello,
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)
  3.  
and:

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)
  3.  
Can anyone help me please???????
Sep 15 '15 #1
0 2159

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

Similar topics

22
by: Duncan Jones | last post by:
Hello, I just installed MySQL 4.0.18 on my Win2K computer. Once it installed, I ran the WinMySQLAdmin program and everything worked fine. The little green light was on, and I could connect to...
0
by: Good Man | last post by:
Hi there I just installed MySQL 5, and its running great except that the query cache is not working, despite the configuration excerpt from my "my.ini" below: query_cache_size=5M...
3
by: Vinay Jain | last post by:
Hi I want to write soundex query for example: select * from student where name soundex 'vinay'; In psql it gives error at soundex. Regards Vinay -- Vinay Jain Dissertation Project Trainee...
5
by: Ted | last post by:
I am working on two versions of an application, one of which will be a windows forms application (which will need to be redistributable) and the other will be a web application. I have MS Visual...
4
by: karthikeyanck | last post by:
How to query MySQL from a web browser URL. I 've a Apache server running on my Ubuntu machine which has PHP and MySQL installed. I 've an assignment to demonstrate how SQL Injection works, I...
1
by: hergele | last post by:
Hello all.. I am trying to convert an application which is working on Oracle to postgreSql.. I've seen a query in code something like this... select * from table1 a1 , table1 a2, table2 a3, ...
3
oranoos3000
by: oranoos3000 | last post by:
hi i work with php and mysql on the os windows i want to using function strtotime for compute diffrences between two date , one with format date("Y-F-d") and another date is current time and...
0
by: phani kumar NSR | last post by:
i have a query which is in oracle pls convert and give me in postgresql format. SELECT MST.TW_TRAN_NO ,NVL(DEPT_RCPT_NO,'--'),CONSUMER_NO,NVL(CONSUMER_NAME,'---'), UPPER( DECODE...
2
matheussousuke
by: matheussousuke | last post by:
A while ago, the website was working, but now, the whole mysql stopped working, I mean, the website oppens, doesnt not show any connection errors, but I can't make any querry. If I try to login, I...
1
by: sg2808 | last post by:
The update query is not working and I cannot understand why. I have attached the screenshots with SQL and Design view. SQL - UPDATE DetProcess INNER JOIN RiskDetailsTable ON...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.