Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sql
Message
 
 
À
08/02/1999 01:20:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Sql
Divers
Thread ID:
00184976
Message ID:
00185041
Vues:
20
>SELECT *, .T. AS cFlag FROM hold WHERE hold.data_prod >= &lcDate1;
> AND hold.data_prod <= &lcDate2;
> and !DELETED() INTO CURSOR tmpHold
>
>How can I do this

If you have SET DELETED ON, you do not need the !DELETED(). Also make sure you have created an Index tag on DELETED(). All of this will optimize your queries, filters, etc. IF this is going to be something you use often, you can also make this into a parameterized view which will function like a table in the DBC.
create sql view Local_View_Name as ;
   SELECT *, .T. AS cFlag FROM hold ;
   WHERE between(hold.data_prod, ?lcDate1, ?lcDate2)
Then when you need to use the table:

lcDate1 = some_date_1
lcDate2 = some_date_2
use Local_View_Name

** the need for different dates arises

lcDate1 = some_other_date_1
lcDate2 = some_Other_date_2
=requery("Local_View_Name")
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform