Hi!
Delete from TableEx where TableEx.IDNUMBER IN (Select TE.IDNUMBER from TableEx TE Where !empty(TE.CODE) )
You also can improve performance when you change last WHERE to "!(TE.CODE == ' ')", be sure to place correct number of spaces in the single quotes that should match to the width of field.
>Hi All,
>
>I would like to use SELECT command to search only in one table (DBF).
>Could anyone help me with some codes ?
>
>TableEx.dbf contained three fields :
>
>IDNUMBER DATE CODE
>
>11111 01/01/01
>11111 01/02/01 X
>11111 01/03/01
>11111 01/04/01
>22222 01/01/01
>22222 01/02/01
>22222 01/03/01
>22222 01/04/01
>33333 01/01/01
>33333 01/02/01
>33333 01/03/01 Y
>33333 01/04/01
>
>after used SELECT and DELETE, I should have only one IDNUMBER
>left in the TABLEEX.DBF means every IDNUMBER who had no blank CODE
>should be deleted from the table.
>
>22222 01/01/01
>22222 01/02/01
>22222 01/03/01
>22222 01/04/01
>
>Thanks in advance,
>Paul
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.