ORDER RECORDSET BY NULL WITH DAO

USUARIO.EXCLUIDOS 11/09/2007 07:37:09
#234978
Ho to order entire recordset in ANAGRAFICA1 by APPELLATIVO where APPELLATIVO is blank?
move all blank recordset in the top of table, i think ASC
Note: in table are present 1.202.589 rds

Set DB2 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\APPELLATIVI.MDB")
Set RSD2 = DB2.OpenRecordset("APP")
Set DB1 = DBEngine.OpenDatabase("D:\PUBBLICA\APPLICAZIONI\ANAGRAFICA_OK_10092007.mdb")
Set RSD1 = DB1.OpenRecordset("ANAGRAFICA1")
''''''''''''''''''''''''''
HERE ORDER RECORDSET
''''''''''''''''''''''''
RITORNO:

With RSD1

Do While Not RSD1.EOF
If RSD1.Fields("APPELLATIVO") = "" Then
COPE = RSD1.Fields("COPE")
Call INSERISCIANAGRAFICA(COPE)
RSD1.MoveNext
Else
RSD1.MoveNext
End If
Loop

End With

USUARIO.EXCLUIDOS 11/09/2007 09:14:19
#234990
Hello,

try this

With RSD1

Do While Not RSD1.EOF
If isNull(RSD1.Fields("APPELLATIVO")) Then
COPE = RSD1.Fields("COPE")
Call INSERISCIANAGRAFICA(COPE)
RSD1.MoveNext
Else
RSD1.MoveNext
End If
Loop

End With
Tópico encerrado , respostas não são mais permitidas