need to convert sql server query to mysql query
NickName:Ratheesh Zachariah Ask DateTime:2014-08-13T20:58:09

need to convert sql server query to mysql query

I've need to convert following sql server query into mysql

SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, p_date)) [date],
       SUM(p_amount) [sum]
FROM tbl_Payments
WHERE DATEADD(dd, 0, DATEDIFF(dd, 0, p_date)) BETWEEN '20130701' AND '20130731'
GROUP BY DATEADD(dd, 0, DATEDIFF(dd, 0, p_date))

column names: p_date,p_amount

Copyright Notice:Content Author:「Ratheesh Zachariah」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/25286890/need-to-convert-sql-server-query-to-mysql-query

More about “need to convert sql server query to mysql query” related questions

How to Convert SQL Server Query to MySQL Query

I'm trying to convert this SQL Server query to MySQL query how can i do that? Fallowing is my SQL server query. I need to convert this query to execute in MySQL. EpfNO is the Primary key and IsVali...

Show Detail

need to convert sql server query to mysql query

I've need to convert following sql server query into mysql SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, p_date)) [date], SUM(p_amount) [sum] FROM tbl_Payments WHERE DATEADD(dd, 0, DATEDIFF(dd, 0, ...

Show Detail

convert mysql query to sql server query

I want to convert below mysql query to sql query.I want to use If condition in sql server SELECT foodName, IF( foodPrice>2000, 'Expensive', 'Cheap') as fpDesc, discountPercent FROM restaurant.f...

Show Detail

Convert MySQL query to Microsoft SQL Server

I need to convert this MySQL query to a SQL Server query where the syntax 'LIMIT ?, ?' is my main main problem because isn't compatible with SQL Server. At the same time I don't know the meaning ...

Show Detail

Convert query from MySQL to SQL Server

I am trying to convert below MySQL query to SQL Server. SELECT @a:= @a + 1 serial_number, a.id, a.file_assign_count FROM usermaster a, workgroup_master b, ( SELECT @a: = 0...

Show Detail

How to convert this Microsoft SQL query into a MySQL query?

I used this query to get particular result from a Microsoft SQL Server table, but now I need to convert this query into MySQL query. I don't know how to do that. SELECT TOP 3 COUNT(Item1) AS ITEM_...

Show Detail

SQL SERVER QUERY to MYSQL QUERY

I am trying to convert this MSSQL QUERY to MYSQL Query looks like this select tu.FirstName+' '+tu.LastName as name,tg.Name as game_name,tg.Status,tg.UserId,tg.gameid from tblUsers tu inner ...

Show Detail

How to convert mysql query into SQL Server query?

How to covert mysql query into mssql query? SELECT name FROM user LIMIT 5, 10 I have known that mssql don't support 'limit'... But I have to use limit! How to covert mysql query into SQL Server...

Show Detail

Converting Sql server query to MySql query

I am trying to convert Query from sql server to MySql. My query in Sql is like below: WITH ChildCategories (ParentID, categoryID, Level) AS ( SELECT e.ParentID, e.CategoryID, 0 AS Level FR...

Show Detail

Convert SQL Server Query to MongoDB Query @ Runtime

I am in a situation where I need to convert my dynamically generated SQL Server query to Mongo DB query. Is there any tool/plugin/nuget package available that takes sql server query as input and ou...

Show Detail