troubleshooting Question

Select statement with SQL

Avatar of kdeutsch
kdeutschFlag for United States of America asked on
SQL
9 Comments1 Solution204 ViewsLast Modified:
What I am trying to do is select a list of names based of of what was picked in dropdown boxes.  So first is the taskforce dropdown wich will fill the UIC drop down box.  On the UIc drop down box is when it should query a list of names based on what was picked on the taskforce drop down then what ws picked on the UIC drop down and then wether a bit was present in another table.    SO first I am picking the user name and SSN from tbls Sidpers and SADDOTNET and then trying to match this to  what was picked in the taskforce & UIC dropdowns based on the intUICID which is in the tblUIC.  Then the final kicker is the that those pciked must have a 1 in bitpresent in the tblassignedPersonnel.  So heres what i have but it keeps giving me incorrect syntax near WHERE and tblassignedpersonnel.

select      p.sidstrNAME_IND,
      u.strSSN
from      cms.dbo.tblsidpers as p INNER JOIN
            tblAssignedPersonnel as u on u.strSSN = p.sidstrSSN_SM
where      sidstrSSN_SM in (select strssn fro tblAssignedPersonnel where intUICID =
            (select intUICId from tblUIC where intTaskforceId = '1' and strUIC = '2' and bitpresent = '1')
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros