Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering duplicate record in a table
Message
From
07/01/2003 03:15:14
 
 
To
07/01/2003 02:42:45
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00738664
Message ID:
00738669
Views:
14
Hi,

&&Select count of reccords in the table myTable
select count(*) as reccnt,animal from myTable group by animal into cursor _myTable
scan for reccnt>1
delete from myTable where animal=_myTable.animal
insert into myTable (animal) values(_myTable.animal
endscan
&& if You use SQL Server, can use delete with subquery

About difference in minutes use datetime format, for example:
date1="01/01/2002 18:30"
date2="02/01/2002 8:00"
?(date2-date1)/60 will give you a correct answer
Best regards

Sevdalina Draganova
Previous
Reply
Map
View

Click here to load this message in the networking platform