Loading ...
Sorry, an error occurred while loading the content.

4491BEGINNER NEEDS HELP

Expand Messages
  • charlesmarkcarroll
    Apr 2, 2010
    • 0 Attachment
      From: "lv_solutions" <lvs.mail@...>
      Date: Fri Apr 2, 2010 3:29 pm
      Subject: BEGINNER NEEDS HELP


      Need help please with following Query

      Table 1 Holds user info
      Table Name = USERS: Fields are: UserID, UserName, Full Name

      Table2 holds permissions for users to view cameras
      Table Name = Permissions: Fields are: PermissionID, UserID, CameraID,
      AllowViewing

      Table3 - has list of cameras and if they are active
      TambleName = CM_Cameras: Fields are: CameraID, Active, LocationID,

      Table 4 holds Camera Name
      Table Name = SYS_Location: Fields Are: LocationID, CameraLocation

      First off It is not my database so I cannot change the tables in any manner.

      I have written the following query to display a list of cameras that the users
      have.

      The problem I have is that if I add a camera to the Camera Table it does not
      show up in the list.

      Can someone help.

      SELECT Users.UserId, Users.UserName, Users.FullName, Permissions.CameraID,
      Permissions.AllowViewing, CM_Cameras.Active,
      SYS_Locations.Location
      FROM Permissions INNER JOIN
      Users ON Permissions.UserID = Users.UserId INNER JOIN
      CM_Cameras ON Permissions.CameraID = CM_Cameras.CameraID
      INNER JOIN
      SYS_Locations ON CM_Cameras.LocationID =
      SYS_Locations.LocationID
      WHERE Users.UserID = :aUserID
      ORDER BY Users.UserId
    • Show all 18 messages in this topic