Help!!! SQL

Results 1 to 2 of 2

Thread: Help!!! SQL

  1. #1
    Help!!! SQL Guest

    Default Help!!! SQL

    I have 3 tables in my access db.<BR>ServerInfo, DepartmentInfo and ServerDepartment, serverDepartment consisting of the 2 preious tables ID Numbers.<BR><BR>I need to select the department names from the Department Table that aren&#039;t associated with a particular server. While I can retrieve the departments assocaited with the server, I can&#039;t select the departments not associated with the server as it brings back all departments even if the server is associated with it already.<BR>For example:<BR>If I use<BR><BR>SELECT [Department].[DeptmentID]<BR>FROM Department INNER JOIN ServerDepartment ON [Department].[DeptmentID]=[ServerDepartment].[DeptmentID]<BR>WHERE serialnumber=&#039;gh&#039;;<BR>I get x,y,z<BR><BR>However if I use &#060;&#062; to &#039;gh&#039;<BR>It still gives back x,y,z and more since other servers in the ServerDepartment table are associated with that department ID <BR>Please Help!<BR><BR>

  2. #2
    Linda Pyrc Guest

    Default RE: Help!!! SQL

    I think you may need to specify <BR><BR>WHERE [ServerDepartment].[serialno]&#060;&#062;&#039;gh&#039;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts