We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

CFquery problem with two inner join statements

lhaluska
lhaluska asked
on
Medium Priority
207 Views
Last Modified: 2013-12-24
Hello I have a query that has two inner join statements. When I had only one it worked but for some reason it doesn't work now. help please...
 SELECT     a.systemName, a.systemNumber, a.numberofcpu, a.numberofio, a.ORG, a.division, b.director, a.type, a.comment, a.disposition, locations.Building_Number_Compaq, a.dateleftbldg, a.rmano, a.redeploy, a.lightson, a.footprint, a.srdate, a.srby, a.onallcount
FROM         dbo.NSKSystemInfo a INNER JOIN dbo.director b ON a.director_id = b.director_ID, NSKSystemInfo INNER JOIN locations ON NSKSystemInfo.loc_id = locations.location_id
WHERE     (a.onallcount = 'Yes')
order by a.systemname
Comment
Watch Question

dont need the comma

SELECT     a.systemName, a.systemNumber, a.numberofcpu, a.numberofio, a.ORG, a.division, b.director, a.type, a.comment, a.disposition, locations.Building_Number_Compaq, a.dateleftbldg, a.rmano, a.redeploy, a.lightson, a.footprint, a.srdate, a.srby, a.onallcount
FROM         dbo.NSKSystemInfo a
INNER JOIN dbo.director b ON a.director_id = b.director_ID
INNER JOIN locations ON NSKSystemInfo.loc_id = locations.location_id
WHERE     (a.onallcount = 'Yes')
order by a.systemname
SELECT     a.systemName, a.systemNumber, a.numberofcpu, a.numberofio, a.ORG, a.division, b.director, a.type, a.comment, a.disposition, locations.Building_Number_Compaq, a.dateleftbldg, a.rmano, a.redeploy, a.lightson, a.footprint, a.srdate, a.srby, a.onallcount
FROM         dbo.NSKSystemInfo a
INNER JOIN dbo.director b ON b.director_ID = a.director_id
INNER JOIN locations ON locations.location_id  = a.loc_id
WHERE     (a.onallcount = 'Yes')
order by a.systemname

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
thank you very much that works great....
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.