Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select in SQL Server
Message
 
 
À
14/06/2004 18:58:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00913605
Message ID:
00913722
Vues:
24
It's better to use derived table instead of temporary table. You can also make you queries readable and easier portable between Query Analyzer and VFP by using textmerge.
TEXT TO lcSql TEXTNERGE NOSHOW PRETEXT 7
SELECT * from (SELECT c_cod_matpri, sum(n_quant) as quant 
                from tbl_gp_movimentospedidos 
                where c_ord_pro = '<<tcID>>' 
                group by c_cod_matpri  	
               ) a 
left outer join tbl_empresa b on b.c_codigo='001' 
left outer join tbl_gp_CodMateriasPrimas c 
    on a.c_cod_matpri = c.c_codigo 
left outer join tbl_gp_CodKitEmbalagem d 
      on a.c_cod_matpri = d.c_codigo 
order by a.c_cod_matpri 

ENDTEXT
>
>Thank's for your help... I follow your comment and have this work in SQL Query Analyser....but if pass it like this with ADO it returns nothing...
<snip>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform