473,325 Members | 2,785 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

query convert from oracle to mysql

Hello all,

can anyone conver the following ORACLE query to MySQl equivalent query,

$account_fields['avg_days_pay_c'] = $this->oracle("SELECT ROUND(SUM(TO_DATE(PAID_DATE) - TO_DATE(INVOICE_DATE))/COUNT(*)) AS AVGDAYS
FROM INVO
WHERE BILLTO_ABRV = '$focus->kp_code_c'
AND IS_PAID = 'Y'
AND STATUS <> 'Void'
AND PAID_DATE > to_date('$smoago 00:00:00','yyyy-mm�dd hh24:mi:ss')");


Thnx in advance.
Jul 15 '10 #1
0 1205

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

Similar topics

3
by: Kevin Thorpe | last post by:
Is there a simple way to create a query log for mySQL? I've been asked^h^h^h^h^h told to add a layer of auditing on an existing application. It's unlikely that this audit log will ever be looked at...
14
by: smilesinblues | last post by:
Hi all, I have a table with a lot of songs. All songs have a field called hits. Everytime a song page is seen hits becomes hit++, everything smooth going. I also have a page where I run the...
133
by: jonathan | last post by:
hey all, I realize that this question might pop up from time to time, but I haven't seen it a while and things might of changed, so - Right now (July 2004) how does mysql stand up in...
6
by: smedstadc | last post by:
Hi, I'm learning the ropes with PHP and MySQL at the moment, and I've run into a puzzle. I'm using PHP to process a form and insert some simple information into a table. The code doesn't have any...
2
Vasuki Masilamani
by: Vasuki Masilamani | last post by:
Hi, I have a SQL query like this. DECLARE @months table(Month int identity (1,1)) DECLARE @i int set @i = 0 WHILE(@i<12) BEGIN INSERT @months default values SET @i = @i + 1
0
Vasuki Masilamani
by: Vasuki Masilamani | last post by:
This is an SQL Query which would create a variable table and inserts sequence of numbers into the table. declare @months table(Month int identity (1,1)) declare @i int set @i = 0 while(@i<3)...
7
by: Muddasir | last post by:
i am having problem in printing the query result from MySQL db... actually i am developing a very simple search module. when the user select category from the given categories in drop down...
1
by: Muhamamd Khayyam | last post by:
I am passing a query to Oracle 9i using Oledb.command object. Code is Dim c As OleDb.OleDbCommand Dim sOURCE As BindingSource Dim DR As OleDb.OleDbDataReader ...
0
by: viki1967 | last post by:
Problem with query ASP and MySQL Hi there. I have this fields in the tbl (mysql) : - ID (unique) - user_name (text) - Date (yyyy-mm-dd) - Description (text - case A or B or C -)
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, ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.