Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using immediate IIIF in SQL statements
Message
From
08/06/2011 08:55:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01513517
Message ID:
01513518
Views:
99
This message has been marked as the solution to the initial question of the thread.
>I ran the following code, which was working until I added an IIF statement in the select clause is giving me problems in compiling; it says it's missing a comma.
>
>
>	SELECT ;
>			ct.Name, cv.GrpID, cv.GrpNum, cv.Date, ;
>			cv.Seq, aa.EMP_ID, cv.CovCd AS PlanKey, ;
>			SPACE(8) AS BnftName, cv.PREM, cv.Bill_Date, ;
you've got an extra closing bracket/parenthesis before the AS
>			IIF (NOT EMPTY(aa.Depos_Date), cv.Prem, 0000000.00))  AS Collected ;

>	FROM BLCEXTAA aa ;
>	JOIN BLCEXTCV cv ;
>		ON aa.GrpID+aa.GrpNum+aa.Date+aa.Seq=cv.GrpID+cv.GrpNum+cv.Date+cv.Seq ;
>	JOIN GRPEXTCT ct ;
>		ON cv.GrpID=ct.GrpID ;
>	WHERE ;
>		aa.Stat_Code="P" AND ;
>		cv.GrpID=lcGrpID AND ;
>		cv.CovCd=lcPlanKey AND ;
>		YEAR(cv.bill_date)=2010 ;
>	ORDER BY cv.GrpID, cv.GrpNum, cv.CovCd ;
>	INTO TABLE tmpData
>
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform