V4RB ... finding duplicate values
Pedro fp
lists at pedro.Net.au
Wed Apr 16 23:03:20 CDT 2003
G'day Folks
I have a table that has one field that must be unique & has the flags
set as kv_Unique + kv_Indexed but without some handling has a real
possibility of there being duplicate values. Thankfully there is also a
rule for breaking the duplication.
I've considered doing an SQLselect like this ...
SELECT RecID FROM myTable WHERE myUniqueField = myNewValue
& checking the recordCount which should always be 0 or 1 but it occurs
to me that even though I haven't found it there might be a better way
to do this check. Is there?
If not is it valid to submit a query like ...
SELECT FROM myTable WHERE myUniqueField = myNewValue
since I don't actually need any fields for this check?
Whatever check I use must be applied to every record as the data is
being imported & if it turns out the value already exists the check
must be repeated for the modified value until a unique value is
achieved.
Cheers, Pedro :-)
Web: <http://www.pedro.net.au> PGP Key ID: 387CD96F
Instant messaging... AIM: bandidoOfOz ICQ: 27671678 Jabber: pedrofp
MSN: mail at pedro.net.au Yahoo: pedro_fp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"What difference does it make to the dead, the orphans, and the
homeless, whether the mad destruction is brought under the name
of totalitarianism or the holy name of liberty and democracy?"
M K (Mahatma) Gandhi
More information about the Valentina
mailing list