Trying to Run a Report...What am I doing wrong?

Comments

8 comments

  • Adam Ruth

    It sounds like you may be missing the DiskDrives table in the from clause of the SQL.  You can add it like this:

    from Computers join DiskDrives using (ComputerId)
    0
    Comment actions Permalink
  • Kyle Rockwell

    I attached a file of what I am doing. I added the line but I am getting a syntax error when trying to run it.

    0
    Comment actions Permalink
  • Kyle Rockwell

    I was able to get it to work, however, when it displays it does not display in GB.

    0
    Comment actions Permalink
  • Adam Ruth

    The size column is in bytes, so you need to divide it to make it GB:

    select
    Computers.Name as "Computer Name",
    Computers.Description,
    DiskDrives.Size / 1024 / 1024 / 1024
    from Computers join DiskDrives using (ComputerId)
    where <ComputerFilter>
    0
    Comment actions Permalink
  • Kyle Rockwell

    Thank you very much for the quick response! One last question. If I also wanted to get a list of applications how would i create the column for applications?

    0
    Comment actions Permalink
  • Adam Ruth

    You would use the Applications table like the DiskDrives table.  

    select
    Computers.Name as "Computer Name",
    Computers.Description,
    Applications.Name
    from Computers join Applications using (ComputerId)
    where <ComputerFilter>
    0
    Comment actions Permalink
  • Kyle Rockwell

    I figured out how to do it for applications! Thanks for all your help!

    0
    Comment actions Permalink
  • Adam Ruth

    No worries.

    0
    Comment actions Permalink

Please sign in to leave a comment.