SQL JOIN NO JOIN 
Author Message
 SQL JOIN NO JOIN

I need to link 3 ^&*%^* tables ... Easy right?

table1 fields  name,workid,homeid   example  "Steven",34,12

worktable fields workid, description example  34, "Janitor"

21, "CEO"

homes fields homeid , address                       54, "119 Daris"

12, "23 Park Avenue"

How the hell do select "Steven","Janitor","23 PArk Avenue" in a sql

Tried this
Select  table1.name,worktable.description,homes.address table1 inner join
worktable on table1.workid = worktable.workid inner join homes on
table1.homid = homes.homeid

and about a million other ways... Man i am missing foxpro right now!

--
Craig Ison

Remember if your Going to Kneel Make Sure its the Pope And Not President

Remove The MR from my e-mail Address For Replying



Sun, 17 Dec 2000 03:00:00 GMT  
 SQL JOIN NO JOIN

Try this (The code is freehand. Obviously, I can't test it without creating
tables that match yours):

Select  table1.name,worktable.description,homes.address FROM (table1 inner
join worktable on table1.workid = worktable.workid) inner join homes on
table1.homid = homes.homeid

Lee Weiner
weiner AT fuse DOT net


Quote:

>I need to link 3 ^&*%^* tables ... Easy right?

>table1 fields  name,workid,homeid   example  "Steven",34,12

>worktable fields workid, description example  34, "Janitor"

>21, "CEO"

>homes fields homeid , address                       54, "119 Daris"

>12, "23 Park Avenue"

>How the hell do select "Steven","Janitor","23 PArk Avenue" in a sql

>Tried this
>Select  table1.name,worktable.description,homes.address table1 inner join
>worktable on table1.workid = worktable.workid inner join homes on
>table1.homid = homes.homeid

>and about a million other ways... Man i am missing foxpro right now!



Mon, 18 Dec 2000 03:00:00 GMT  
 SQL JOIN NO JOIN

Quote:

> I need to link 3 ^&*%^* tables ... Easy right?

> table1 fields  name,workid,homeid   example  "Steven",34,12

> worktable fields workid, description example  34, "Janitor"

> 21, "CEO"

> homes fields homeid , address                       54, "119 Daris"

> 12, "23 Park Avenue"

> How the hell do select "Steven","Janitor","23 PArk Avenue" in a sql

> Tried this
> Select  table1.name,worktable.description,homes.address table1 inner join
> worktable on table1.workid = worktable.workid inner join homes on
> table1.homid = homes.homeid

> and about a million other ways... Man i am missing foxpro right now!

Try this:

select
table1.name,
worktable.description,
homes.address
from
table1,
worktable,
homes,
where
worktable.workid = table1.workid
and homes.homeid = table1.homeid
and table1.name = 'Steven'

 Mike



Mon, 18 Dec 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Join 6 Join

2. SELECT . INNER JOIN--INNER JOIN

3. PRB: Left join behaves like a inner join.

4. Join, Join & join!

5. table join with a sum works in sql

6. QueryDef and SQL JOINs

7. Acc20: Working Querydef's SQL Property Yields Unsupported Join Expression

8. SQL - JOIN and IN (extern DB) at the same time

9. Multiple Joins SQL Statement

10. SQL - Join one table in one destination to another table in another destination (DBF)

11. SQL JOIN and tables not updatetable

12. Automatic SQL Generation for INNER JOINs

 

 
Powered by phpBB® Forum Software