Karin Br.
29th August 2002, 15:29
Is it possible to delete records in a table, using an exchange scheme ?
I have to delete a lot of non-consecutive records in a table
ramchand50
29th August 2002, 16:01
I think, there is an option to Delete records through exchange (please refer to tuxch0121m000 session - Form 2). But, I have always used db.delete() function to do something like this.
Karin Br.
29th August 2002, 16:06
the problem is I don't have the knowledge to write scripts
ramchand50
29th August 2002, 16:19
You might want to refer to the session help (for the session I have mentioned before) if you want to use the Exchange.
Alternatively, if you prefer to write a script, here is the sample script:
db.retry.point()
select tdpur900.*
from tdpur900 for update
where tdpur900.field1 = :criteria1
and tdpur900.field2 = :criteria2
selectdo
|You can even have some If conditions within this
| select statement...
db.delete(ttdpur900, db.retry)
commit.transaction()
endselect
commit.transaction()
}
But this depends on the complexity of the task that you are going to perform. And, you got to be very cautious about the data integrity, references, etc.
:)