WHERE Documento = "123"Índice Composto
WHERE (UF = "PR") and (Documento = "123")mas terá que utilizar
WHERE UF+Documento = "PR123"Porque, neste caso, não há um indice UF e outro Documento, mas há o índice "UF+Documento".
WHERE Documento = "123"Se DELETED estiver ON o VFP executará:
WHERE (Documento = "123") and (not Deleted())&& Por isso é mostrado RUSHMORE parcialSET COLLATE
Clear CriarDados() Sys(3054, 12) && Liga a exibição do nível de otimização Set Deleted On && Assim será mostrado PARCIAL ?"------------- NONE -------------------" Select * from C:\TESTES\THREAD792165\Nomes where I_Codigo < 10 into cursor curNone ?"------------- PARCIAL ----------------" Select * from C:\TESTES\THREAD792165\Nomes where C_Nome = 'G' into cursor curParcial ?"------------- FULL -------------------" Set Deleted Off && Assim será mostrado FULL Select * from C:\TESTES\THREAD792165\Nomes where C_Nome = 'G' into cursor curFull ?"------------- COLLATE diferente do do índice -------------------" Set Collate To "GENERAL" Select * from C:\TESTES\THREAD792165\Nomes where C_Nome = 'G' into cursor curGeneral ?"------------- COLLATE igual ao do índice -------------------" Set Collate To "MACHINE" Select * from C:\TESTES\THREAD792165\Nomes where C_Nome = 'G' into cursor curMachine ********************************************************************************** Procedure CriarDados If Directory("C:\TESTES\THREAD792165") Return EndIf MkDir C:\TESTES\THREAD792165 Create table C:\TESTES\THREAD792165\Nomes (I_Codigo I, C_Nome C(20)) Set Collate To "MACHINE" Index On C_Nome tag Nome For I = 1 to 10 lcC = Iif(I = 1, "Adao", Iif(I = 2, "Jose", Iif(I = 3, "Joao", Iif(I = 4, "Carlos",; Iif(I = 5, "Amadeu", Iif(I = 6, "Sampaio", Iif(I = 7, "Lopes",; Iif(I = 8, "Geraldo", Iif(I = 9, "Marcia", "Telma"))))))))) For J = 1 to 10 lcNome = lcC + " - Teste" + (Alltrim(Str(J))) Insert into C:\TESTES\THREAD792165\Nomes (I_Codigo, C_Nome) ; values (Reccount("Nomes") + 1, lcNome) EndFor EndFor EndProc && Procedure CriarDados