>>Yes, indeed, I too hate the way it mangles SQL statements .. and would never have thought of that kludge to have it skip lines of code.
>>
>>Just out of curiosity .... can you show what you would like some 'pretty' SQL code looks like, before its mangled?
>
>Something like:
>
>SELECT;
> Cur1.iObj_Ix,;
> Cur1.cName,;
> Cur1.c5F1,;
> NVL(Cur2.l1f1,.F.) AS lTeilMagaziniert,;
> .F. AS lMark,;
> A_longExpression_to_generate+;
> a_Field AS LongField,;
> A_longExpression_to_generate+;
> a_Field Other_LongField;
> FROM DBC1!Lieferung AS Cur1;
> LEFT OUTER JOIN (;
> SELECT;
> Cur2_1.Parent_Ix,;
> MAX(.T.) AS l1f1;
> FROM <<lcDBC1>>!Lieferteile as Cur2_1;
> WHERE Cur2_1.iTyp=dnTyp_LieferTeile;
> AND Cur2_1.iSubTyp=1;
> AND Cur2_1.n1F2#0;
> GROUP BY 1;
> ) AS Cur2;
> ON Cur1.iObj_Ix=Cur2.Parent_Ix;
> WHERE Cur1.iTyp=dnTyp_Lieferung;
> AND Cur1.iSubTyp=1
>
>
>Agnes
Update:
I like this extended intendation like
lax = Exp1;
AND (;
Exp2:
OR !Exp1;
);
And Exp4
on expressions to.
Basically:
-between parenthesis, but not the the parenthsis itself, (this includes subselects as well)
-on ON is indented to it's join,
-extra lines on ON, WHERE, HAVING; ORDER etc. to it's base command.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]