Hi Jim,
I just tried it and I only get 1 record back. ab_id = 57 and catagory = catlink.catagory.
Perhaps I'm goin about it the wrong way. I have a table called AddressBook the PK is ab_id. I have a table called catagory that has a list of catagories that and AddressBook contact might belong to. Since it is a many-to-many relationship I created a linker table to connect them, CatLink. The CatLink table might look like:
ab_id catagory
1 animal
1 mineral
2 animal
3 animal
3 mineral
3 vegetable
etc..
I'm trying to create a table that will tell me all of the catagories and which ones an addressbook record is attached to. I was hoping my temp table would look like:
ab_id catagory
.null. animal
2 mineral
.null. vegetable
Am I not going about it the right way?
Thanks for you help.
>Roi,
>
>Try;
>
>
>SELECT catlink.ab_id, catagory.catagory ;
> FROM catagory ;
> LEFT JOIN catlink ;
> ON catlink.catagory = catagory.catagory ;
> where catlink.ab_id = 57 ;
> INTO CURSOR temp
>
Roi
'MCP' Visual FoxPro
In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!