Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
1812 - SQL: Statement Too Long
Message
 
À
01/09/1999 11:26:19
Dan Coffey
Computer Presentation Systems
Rancho Cordova, Californie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00260210
Message ID:
00260262
Vues:
15
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform