Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compare and append
Message
 
 
To
04/03/2009 07:53:31
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:
01385447
Views:
49
This message has been marked as the solution to the initial question of the thread.
>thank you
>
> when i run the code as IS NULL i get error message
>Field "EmpNo" does not accept null values
>
Ok, change it to
insert into emplo  (empno, Tel) ;
select t1.empno, t1.Tel from tel t1 ;
LEFT JOIN emplo T2 on T1.empno = T2.empno where T2.empno IS NULL
You need to use T1.EmpNo, not T2.EmpNo

Alternatively
select Tel.EmpNo, Tel.Tel from Tel ;
where not exists (select 1 from EmpNo where EmpNo = Tel.EmpNo) into cursor curAppend nofilter

insert into Emplo (EmpNo, Tel) select * from curAppend
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