Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select count(*) from,
Message
From
06/06/2002 15:42:40
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00665646
Message ID:
00665657
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Can i use this query in visual foxpro to get the count.
>If the count is greater than one then there is a record with the same values and can show a message duplicate record found.


Use the HAVING clause, like this:
lcSource = "SELECT count(*) as Cnt from sub ;
WHERE sub.project_no = projno ;
AND sub.workpkg_no = workpkgno ;
AND sub.sub_sec = subsec ;
AND sub.sub_para = subpar ;
AND sub.sub_seq = subseq ;
AND DELETED() = .f. ;
ORDER BY project_no, workpkg_no ;
HAVING Cnt > 0;
into cursor cSource"
this way, the result will have just Cnt > 0.

HTH
Claudio Lassala
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform