PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Export unique database entries
Export unique database entries
Débuté par scott daughtry, 18 fév. 2024 04:50 - 1 réponse
Posté le 18 février 2024 - 04:50
How can I export a list of unique database field values to a text file?

For example, the animal field contains in the database:

Alligator
Alligator
Cat
Dog
Dog
Penguin
Zebra
Zebra

I created a button on my listbox window to export the database to a .CSV file and use HexportCSV() to export the data, but it contained every database record. I created a Unique key in the Analysis for the desired field, but all that accomplished was displaying a popup error message whenever Hadd() tried to add the record if the index already possessed the animal value (e.g. Zebra).
Membre enregistré
118 messages
Posté le 19 février 2024 - 10:20
Please explain more
What do you want to export?
If you want to export a subset of your table use a "Select * from YourTable where [Your FilterCondition]"-Query and export your query result ...