ORDER BY, NAO CONSIGO ORDENAR.

WANDSON1985 23/09/2012 11:03:34
#410266
Bom diaa, pessoal. não to consguindo orderna esta comando.

socio1.Open [Ô]Select * from qryPesquisaSocio where CODSINDICATO like[ô][Ô] & UCase(OK) & [Ô][ô] and SOCIO like[ô][Ô] & UCase(txtPesquisa.Text) & [Ô]%[ô][Ô], con, adOpenDynamic, adLockOptimistic


Quero ordenar por socio.

alguem me ajuda.
FILMAN 23/09/2012 11:54:07
#410268
Faltou colocar o ORDER BY

[ô]Ordem crescente / Ascendente
socio1.Open [Ô]SELECT * FROM qryPesquisaSocio WHERE codSindicato lLIKE[ô][Ô] & UCase(OK) & [Ô][ô] AND Socio LIKE[ô][Ô] & UCase(txtPesquisa.Text) & [Ô]% [txt-color=#e80000]ORDER BY Socio ASC[/txt-color][ô][Ô], con, adOpenDynamic, adLockOptimistic

[ô]Ordem Decrescente / Descendente
socio1.Open [Ô]SELECT * FROM qryPesquisaSocio WHERE codSindicato lLIKE[ô][Ô] & UCase(OK) & [Ô][ô] AND Socio LIKE[ô][Ô] & UCase(txtPesquisa.Text) & [Ô]% [txt-color=#e80000]ORDER BY Socio DESC[/txt-color][ô][Ô], con, adOpenDynamic, adLockOptimistic
Tópico encerrado , respostas não são mais permitidas