Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Query question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-08-18 : 07:59:18
Les writes "I'm not a real wizard with SQL but am working with it more lately. I've only recently experimented with JOINS, and am having a problem with the following. It says there's an issue "near the JOIN".

Select HoldXref.HoldXrefId, HoldXref.FolderName, HoldXref.ImageRecId,HoldXref.HoldListId, HoldList.HoldId, HoldList.HoldType,HoldList.Comment, HoldList.UserName, HoldTypes.HoldTypeId,HoldTypes.HoldName, HoldTypes.HoldDescription, HoldTypes.DateBased From HoldXref Where HoldXref.FolderName='Dept_06' And ImageRecId = 11 INNER JOIN HoldList On HoldXref.HoldListId = HoldList.HoldId INNER JOIN HoldTypes On HoldList.HoldType = HoldTypes.HoldTypeId


This seems really complicated. When I experimented with it originally, I didn't have the "where HoldXref.FolderName='Dept_06' and ImageRecId = 11"

It was just a prototype and it worked. However, I want to limit the output to this criteria and am not sure how to do that. Maybe it's as simple as putting parenthesis around them, but I've tried several things and it's not working. And for one reason or another, the stuff I find in the book(s) don't happen to have an example similar to what I'm trying to do."

mmarovic
Aged Yak Warrior

518 Posts

Posted - 2005-08-18 : 08:18:50
Where has to be at the end not in the middle.
Go to Top of Page
   

- Advertisement -