Duncan
I would do this type of deletion with the declare cursor.
Buddy
SET VAR vUniqueID INTEGER
SET VAR vLoop INTEGER = 1
DROP CURSOR C1
DECL c1 CURSOR FOR SELECT uniqueID FROM WhatEverTable
OPEN C1
FETCH C1 INTO vUniqueID INDIC iv1
WHILE SQLCODE <> 100 THEN
IF vLoop = 3 THEN
DELETE ROW FROM WhatEverTable WHERE uniqueID = .vuniqueID
SET VAR vLoop = 0
ENDIF
SET VAR vloop = (.vloop + 1)
FETCH C1 INTO vuniqueID INDIC iv1
ENDWHILE
DROP CURSOR C1
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Duncan
Walker
Sent: Monday, September 03, 2007 2:48 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Deletion Question - 6.5
I need to delete every 3rd record from an existing database in order to
provide a large sample of the database to another user. I'm not sure the
wording I would use for the delete command (I will be backing up the
database before doing the deletions).
Thanks,
Duncan
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.485 / Virus Database: 269.13.3/986 - Release Date: 9/3/2007
9:31 AM