>I am working in VFP5 and have found that I can load a grid much quicker with a view. My problem is that the table is poorly designed and has too many fields. In VFP6 there is a command SYS(3055) which is supposed to allow for more complex SQL statements. I have found nothing referring to the issue in VFP5.
>
>What have the pros done?
>Is it possible to create views from views? Silly, I know...
>
>Does anyone have any other ideas?
What is too long, or too big?
You can stop using table_name. and replace it with a. You reference my_table a , my_other_table b,,, etc.
I'm very sure that you can also combine string together for those wicked where clauses before the create sql command in your view. I preload variables for values this way and it works.
proc lv_Look_Ma_No_Hands
where_str1 = 'Where a.cCustomerNo = '+ vp_custno
where_str2 = ' and a.cCustShipTo = '+ vp_cshipto
where_str = where_str1 + where_str2+.....
Create SQLVIEW as lv_Look_Ma_No_Hands ;
sele my_filed_list ;
from all those tables and join conditions;
&where_str ;
dbsetpros() all down here.