Message
 
 
To
19/06/2008 12:04:05
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01325479
Message ID:
01325483
Views:
16
>Yet another compliated SPT string. And believe it or not I really try to figure these out myself before bothering anyone on this forum and I really thank everyone for the help.
>
>I have a table with two columns of employee id's. I need a SPT to use these values to find a matching name from again two possible tables. I figured I could do a join but have only done that where I matched one field.

What about
select * from Mytable My inner Join AnotherTable Another on My.FirstID = Another.EmpID
union ;
select * from Mytable My inner Join AnotherTable Another on My.SecondID = Another.EmpID
If you have two tables add two more UNIONS.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View