Is it possible in T-SQL to get a value from across a
one-to-many-and-many-to-one relationship?
Let me explain. I've got three tables: STORY, LINKS and FOLDERS. A record in
STORY is linked in a one-to-many relationshipo to LINKS with its STORY_ID.
LINKS is linked to FOLDER in a many-to-one relationship. Like so:
STORY
storyID
storyName
LINKS
storyID
folderID
FOLDER
folderID
folderName
I'd like to link storyNAMEs to folderNames. But when I do what seems to be
correct, I get an error about an "illegal outer join request."
Here's the SQL I'm using:
select STORY.storyName, FOLDER.folderName from STORY, FOLDER where
STORY.storyID*=LINKS.storyID and LINKS.folderID*=FOLDER.folderName
I've futzed around with a few variations, but none that bring success.
I'm able to do this in Microsoft Access (it does an outer join on an outer
join). There must be a way to do it in SQL Server.
Is there?