Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select statement - exists in
Message
De
14/04/2010 07:48:48
 
 
À
14/04/2010 07:31:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01460130
Message ID:
01460133
Vues:
51
This message has been marked as a message which has helped to the initial question of the thread.
>Hi
>
>I'm having a bit of a senior moment and for the life of me cannot get a select statement to work?!!??!
>
>I have a table called myOrders, and in that there's a field called myOrders.RegionID. I also have a table called myRegions with the fields RegionID, RegionName.
>
>I'm trying to build a cursor called MyResults that selects a date range from myOrders table, and then uses myOrders.RegionID to pull in the field MyRegion.RegionName.
>
>MyResults should look something like:
>
>myResults.OrderNo
>myResults.OrderDate
>myResults.RegionID
>myResults.RegionName
>
>Help, it's driving me bonker??!?
select  myOrders.OrderNo, ;
            myOrders.OrderDate, ;
           myOrders. RegionID, ;
          myRegions.RegionName ;
   from myOrders ;
        join myRegions  on ( myOrders.RegionID = myRegions.RegionID ) ;
  where ( OrderDate between ?date1 and ?date2 )
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform