Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare and append
Message
 
 
To
04/03/2009 06:49:45
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01385427
Message ID:
01385428
Views:
40
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform