Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I avoid 'SQL: Statement too long (Error 1812)'
Message
From
13/11/2003 09:51:50
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
13/11/2003 09:46:35
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00849187
Message ID:
00849500
Views:
34
Thank you Mike.

I'll rewrite my statement, cross my fingers and hope for the best. If this works, it sure would shorten and simplify the syntax :)

Mike


>AFAIK, if you had a small table of the list of numbers for a.field1 you could do...
>
>SELECT ... WHERE A.FIELD1 IN (SELECT NUMBER FROM SMALLTABLE).
>
>That would work in the other databases too.
>
>>Thanks for the suggestions Mike. I'll give them a try. My only concern is the use of the INLIST function. Would this SQL syntax work with SQL Server and Oracle too? Is it standard SQL? If not, do you have any suggestions as to a similar function that could be used for the latter two databases?
>>
>>This still leaves me wondering why VFP complains about the length of the statement being too big when it is well below the maximum limit of 8000 chars or so.
>>
>>Regards,
>>
>>Mike
>>
>>
>>>In the last part, just do this...
>>>
>>>INLIST(A.FIELD4,1234,2345,3456,4567)
>>>
>>>That would shorten the command a lot. The naming convention used by Drew Speedie makes every field name unique, so there is no need for prefacing. This also shortens the SQL commands. BTW, I avoid A, B as aliases. VFP uses A-L as references to the corresponding work areas. M is reserved for memvars.
>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform