Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compare and append
Message
 
 
À
04/03/2009 06:49:45
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
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01385427
Message ID:
01385428
Vues:
39
>hi all,
>
>i need help to append from table1 to table2 where no not equal no and update table2.tel with table1.tel ,
>table1 structur not equal table structure2 ,table1. no equal tabl2.no
>
>as
>
>table1
> no tel
>1 234
>2 2345
>3 1111
>4 2222
>5 5555
>table2 tel
>1 0
>2 0
>3 0
>6
>7
>
>**************************
>result at table2
>
>1 234
>2 2345
>3 1111
>4 2222
>5 5555
>6
>7
>
>thanks

Try
update T2 set tel = T1.tel from Table2 T2 inner join Table1 T1 on T2.NO = T1.No
insert into Table2 (no, Tel) 
select T1.not, T2.Tel from Table1 
LEFT JOIN Table2 T2 on T1.no = T2.no where T2.no IS NULL
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform