Dominic Burford wrote:
A quick investigation seems to indicate that SYS(3055) might do the
trick.
And Stephen and Mike appear to be wrong in their suggestions - see
http://code-magazine.com/article.aspx?quickid=0404022&page=3
If you are not bound by a low memory environment, consider using
SYS(3055) to set the complexity level of the FOR and WHERE clauses to
its maximum value of 2040 when you set up the environment for your
applications. This allows more complex SQL statements and more values
with IN. See the Help files for a list of other commands and functions
that are affected by this setting.
Regards
Dominic Burford BSc Hons MBCS CITP
Third Party Developer Program Senior Software Engineer
* Tel: +44 (0) 1536 495074
* [EMAIL PROTECTED]
"I conclude that there are two ways of constructing a software design:
One way is to make it so simple there are obviously no deficiencies, and
the other way is to make it so complicated that there are no obvious
deficiencies." -- Tony Hoare, Turing Award Lecture 1980
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of MB Software Solutions
Sent: 24 August 2006 13:34
To: [email protected]
Subject: Re: Long SQL WHERE clauses
Dominic Burford wrote:
Hi
I need some way of executing SQL statements, where the WHERE clause may
be very long. I am trying to get the following to work:
Local lcWhereClause
lcWhereClause = <various conditions>
SELECT * FROM <Table> WHERE &lcWhereClause INTO CURSOR curTemp
Where the length of lcWhereClause exceeds 1024 it produces an error.
Even when I break the statement into two smaller statements, it still
errors:
Local lcWhereClause1, lcWhereClause2
lcWhereClause1 = <various conditions>
lcWhereClause2 = <more conditions>
SELECT * FROM <Table> WHERE &lcWhereClause1 AND &lcWhereClause2 INTO
CURSOR curTemp
How can I get round this?
Isn't there a SYS() command to allow longer SQLs?
--
Michael J. Babcock, MCP
MB Software Solutions, LLC
http://mbsoftwaresolutions.com
http://fabmate.com
"Work smarter, not harder, with MBSS custom software solutions!"
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.