Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need help with a right join (I think?)
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Need help with a right join (I think?)
Miscellaneous
Thread ID:
00256837
Message ID:
00256837
Views:
50
I have 2 tables
This first table, CatLink, has 2 fields
ab_id and catagory

CatLink may have nay number records where the value in ab_id is identical.

The second table, Catagory has 1 field, Catagory. There are 47 total records with each record containing a unique value.

I think you call it a many-to-1 relationship?

I need to end up with a cursor which has 1 record for every record in Catagory (47) and the value of ab_id if ab_id is in the CatLink table (and matches the where clause)
.
I tried:
SELECT catlink.ab_id, catagory.catagory ;
	FROM catagory ;
	right JOIN  catagory ;
	ON catlink.catagory = catagory.catagory ;
	where catlink.ab_id = 57 ;
	INTO CURSOR temp
This gives me the correct number of records however every record is the same. I tried it a bunch of different ways and am now completely confused.

Any help would be appreciated.
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!
Next
Reply
Map
View

Click here to load this message in the networking platform