Quantcast
Channel: Fórum ASP
Viewing all articles
Browse latest Browse all 1214

Erro Query Sql?

$
0
0

Boa tarde pessoal,

 

Com esse select eu faço vários cálculos. Só que tenho usado ele no MYSQL funciona perfeito.

MYSQL

select nome, ((select count(*) from JOGOS where timea=times.nome)+(select count(*) from JOGOS where timeb=times.nome)) as qtdejogo,(((select count(*) from JOGOS where timea=times.nome and resultadoa>resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa<resultadob))*3)+(((select count(*) from JOGOS where timea=times.nome and resultadoa=resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa=resultadob))*1) as ponto from times order by ponto desc

ACCESS, se eu deixar com o ORDER BY PONTO da erro

select nome, ((select count(*) from JOGOS where timea=times.nome)+(select count(*) from JOGOS where timeb=times.nome)) as qtdejogo,(((select count(*) from JOGOS where timea=times.nome and resultadoa>resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa<resultadob))*3)+(((select count(*) from JOGOS where timea=times.nome and resultadoa=resultadob)+(select count(*) from JOGOS where timeb=times.nome and resultadoa=resultadob))*1) as ponto from times

ACCESS, se eu deixar com o ORDER BY PONTO da erro

Microsoft OLE DB Provider for ODBC Drivers erro '80040e10'
[Microsoft][Driver ODBC para Microsoft Access] Parâmetros insuficientes. Eram esperados 1.

Mas se no ACCESS eu deixo order by nome funciona.

 

O que tem de errado nesse select?

 

Att;

 


Viewing all articles
Browse latest Browse all 1214

Trending Articles