<% Login=request.item("Login") Senha=request.item("Senha") wLetra=request.item("Letra") & "%" Set Conexao = Server.CreateObject("ADODB.Connection") Conexao.Open session("stringconexaobomdesorte") Sql = "SELECT Count(Nome) as Total FROM Clientes" Set rstempTotal = Conexao.Execute ( Sql ) Sql = "SELECT DISTINCT (C.NOME), C.Cliente, E.EMPRESA, e.Nome as Empresas FROM CLIENTES C LEFT JOIN TICKETS T ON (T.CD_CLIENTE = C.CLIENTE) LEFT JOIN EMPRESAS E ON (E.EMPRESA = T.CD_EMPRESA) LEFT JOIN PLANOS P ON (P.PLANO = T.PLANO) WHERE C.NOME Like '" & wLetra & "' order by C.NOME" Set rstemp = Conexao.Execute ( Sql ) %>

<% If rstemp.eof then%> Não existe Nomes iniciados com essa letra.

<% else %>

Voltar

Total de Clientes <%=rstempTotal("Total")%>

 

Todas     A B C D E F G H I J K L M N O P Q R S T U V X Z Y W 

 

<% While NOT rstemp.EoF %> <% rstemp.MoveNext %> <% Wend %>
Cliente Empresa
&Cliente=<%=rstemp("Cliente")%>"><%=rstemp("NOME")%> <%=rstemp("Empresas")%>

 

<% END IF %>