>When a long SQL statement is ussed VFP returns SQL too long. Is there a system variable to increase the lenght to this.
You mean your SQL is longer than the maximum VFP command line (8k)?
If so, then you'll have to find ways to cut down the length of your SQL statement. One top idea is to use short alias names for tables that appear frequently in the code.