Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statement Limit
Message
From
03/03/2003 08:56:08
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00760316
Message ID:
00760336
Views:
15
I get an error that "...count is invalid..." etc...it might be a syntax error, but there is an extra ";" that appears in the line when exectuted that's not there before. Here it is:
SELECT;
		acctcont.contrib_dt AS contrib_dt,;
		acctcont.acct_id  AS acct_id,;
		accounts.findex   AS findex,;
		accounts.cashacct AS cashacct,;
		'C'               AS transType,;
		IIF(tnMoneyType = 1, acctcont.emat, IIF(tnMoneyType = 2, acctcont.nprofits, 0)) AS nDollars,;
		0000.0000000      AS nPrice,;
		000000.0000000    AS nshares, ;
		IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate) AS dVestDate, ;
		INT(YEAR(tdTo) - ;
				YEAR(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate)) - ;
				IIF(DATE(YEAR(tdTo), ;
					month(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate)), ;
					day(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate))) > tdTo, 1, 0)) ;
						AS nVestYear, ;
		aVest(INT(;
			YEAR(tdTo) - ;
				YEAR(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate)) - ;
				IIF(DATE(YEAR(tdTo), ;
					month(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate)), ;
		;
			day(IIF(ISNULL(crsVestSch.PlanId), acctcont.contrib_dt, crsVestSch.vdate))) > tdTo, 1, 0)) +1 ,1) ;
						AS nVestPct ;
	FROM acctcont ;
	JOIN accounts ON acctcont.acct_id = accounts.acct_id;
	LEFT OUTER JOIN crsVestSch;
		ON BETWEEN(acctcont.contrib_dt, crsVestSch.date1, crsVestSch.date2);
	WHERE invnum = tcInvnum ;
		AND INLIST(transType, "C", "X", "I", "Y") ;
		AND ((tnMoneyType = 1 AND emat <> 0) ;
		OR (tnMoneyType = 2 AND nProfitS <> 0));
		AND contrib_dt < tdTo;
	ORDER BY contrib_dt ;
	INTO TABLE (lcContribTable)
>Renoir,
>
>I meant, Maximum # of characters per command line 8,192 but both of then come to the same number. Can you provide more details, maybe post some code, to explain what are you trying to do and where do you encounter a problem?
>
>>Sergey,
>>
>>You mean this?
>>
>> Maximum # of characters per macro substituted line 8,192
>>
>>My problem is that when testing an SQL statement in the Command Window, it seems to want to "break" (add a ";") at around the 1,015th character. I thought it might be a capacity issue.
>>
>>Renoir
>>
>>>>What is the length limit to a SQL Statement? Is it 1024? Couldn't find this documented.
>>>>
>>>>Regards, Renoir
>>>
>>>Renoir,
>>>
>>>The same as for any VFP statement - 8,192 characters. You can find it in the help under Visual FoxPro System Capacities
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform