Em Andamento

Convert and optimize MySql Query to MS-SQL

I have a couple of queries in MySql I want to migrate to Microsoft Sql (I am using 2005). Currently is a two stage MySql/PHP operation. I want to convert it to a single MS-SQL Query, without any extra code (no stored procedures).

I have more like this for a proficient DB developer

$query = "SELECT OUTTABLE.MERCHANT_ID,MERCHANTS.MERCHANT_NAME,TERMINAL_ID,SITE_ID, ".

"SUM(USER_FEE_AMT*SPLIT_PERCENT/100 - HAUL_FEE_COMP_AMT) AS PAYEE ".

"FROM OUTTABLE,MERCHANTS ".

"WHERE (OUTTABLE.MERCHANT_ID LIKE '".$prefix."%' AND ".

"OUTTABLE.MERCHANT_ID=MERCHANTS.MERCHANT_ID ".

"AND (TERM_SETL_DATE BETWEEN '$date' AND '$date2') ".

"AND RESP_CODE='00') ".

"GROUP BY (TERMINAL_ID) ORDER BY (TERMINAL_ID) ;";

$result = mysql_query($query);

$complete = Convert2Array($result);

$query = "SELECT MERCHANT_ID,TERMINAL_ID, ".

"SUM(HAUL_FEE_INCOMP_AMT) AS HAUL_FEE_INCOMP ".

"FROM OUTTABLE,RESPONSES ".

"WHERE (MERCHANT_ID LIKE '".$prefix."%' ".

"AND (TERM_SETL_DATE BETWEEN '$date' AND '$date2') ".

"AND OUTTABLE.RESP_CODE=RESPONSES.RESP_CODE AND [url removed, login to view]>0) ".

"GROUP BY (TERMINAL_ID);";

$result = mysql_query($query);

$incomplete = Convert2Array($result);

// more at zip file

## Deliverables

1) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

2) Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

## Platform

Microsoft SQL Server 2005

Habilidades: Vale Tudo, Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software, SQL

Ver mais: n query, sql query, sql microsoft, optimize mysql, mysql query, ms sql, migrate mysql, microsoft sql server, db query, optimize php code, php sql migrate, sql server convert mysql, optimize sql queries, sql optimize, sql operation, convert order, mysql select platform, php mysql optimize, order query platform, sql select order, sql select, php file operation, queries sql, microsoft sql server 2005, convert sql code

Acerca do Empregador:
( 3 comentários ) Peru

ID do Projeto: #2976830

Premiar a:

icewall

See private message.

$2 USD em 1 dia
(32 Avaliações)
4.6

5 freelancers estão ofertando em média $7 para este trabalho

askmetocode

See private message.

$8.5 USD em 1 dia
(15 Comentários)
3.5
aiki2shinvw

See private message.

$8.5 USD em 1 dia
(8 Comentários)
2.0
expertsmeet

See private message.

$6.8 USD em 1 dia
(7 Comentários)
1.4
innovainfotech

See private message.

$6.8 USD em 1 dia
(0 Comentários)
0.0