Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Data Type Mismatch using SELECT cursor command
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00831873
Message ID:
00832076
Views:
16
Hi Dottie,

I believe it would be simpler to get the same result using queries (not tested).
SELECT dn.fullrsn, COUNT(*) AS ttlallrsn;
	FROM csrdens dn ;
		JOIN denreas ON dn.fullrsn = denreas.desc ;
	GROUP BY dn.fullrsn1  ;
	INTO CURSOR crsTotDesc
SELECT dn.fullrsn, dn.vendr AS vendorname, ;
		SUM(IIF(clmtype = "P", 1, 0)) AS ttlprof, ;
		SUM(IIF(clmtype = "I", 1, 0)) AS ttlinst, ;
		SUM(IIF(INLIST(clmtype, "P", "I"), 1, 0)) AS ttlrsn, ;
		td.ttlallvends	;
	FROM csrdens dn ;
		JOIN crsTotDesc td ON td.fullrsn = dn.fullrsn ;
	GROUP BY dn.fullrsn1, vendorname, td.ttlallvends ;
	INTO CURSOR crsResult
SELECT drillsumm
APPEND FROM ( DBF("crsResult") )
>No, no indexes, but the statement that bombs is inside of a scan that is looping through that cursor, does that make a difference? I don't know why it would - that happens all the time, but here's the code leading up to where the problem is...
<snip>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform