Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLExec to handle two SQLs
Message
 
 
À
19/03/2003 23:50:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00767949
Message ID:
00767999
Vues:
12
This message has been marked as the solution to the initial question of the thread.
Michel,

You can use first query as a derived table.
SELECT News.Numero, News.CustomerName FROM ( ;
       SELECT MIN(News.Numero) AS Numero FROM News WHERE Priority=1 ) Temp
 INNER JOIN News ON Temp.Numero = News.Numero
>I need to convert two VFP SQLs into SQLExec(). What I have presently in VFP is one SQL which collects all primary keys from a table. Then, from that cursor, I extract all the necessary fields from the table by the use of a inner join. So, I have something like:
>
>
>SELECT MIN(News.Numero) AS Numero FROM News WHERE Priority INTO CURSOR Temp
>
>SELECT News.Numero,News.CustomerName FROM Temp;
> INNER JOIN News ON Temp.Numero=News.Numero INTO CURSOR Temp
>
>
>Basically, how can I achieve the same from a SQL Server table by the use of SQLExec()?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform