order by em campo calculado
Por que da erro?
select clientes.NOME ,
(select sum(notas.valor_total) from notas where notas.cliente_id = clientes.cliente_id) valor
from clientes order by notas.valor_total
steve narancic
select clientes.NOME ,
(select sum(notas.valor_total) from notas where notas.cliente_id = clientes.cliente_id) valor
from clientes order by notas.valor_total
steve narancic
Steve_narancic
Curtidas 0
Respostas
Fsflorencio
22/04/2005
Ordene pela posição do campo que funciona
order by 2
order by 2
GOSTEI 0
Steve_narancic
22/04/2005
valeu, funcionou perfeitamente
GOSTEI 0