Results 1 to 2 of 2

Thread: InfoNet SQL

  1. #1

    InfoNet SQL

    Hi - I'm trying do use an SQL to interrogate CCTV survey data in Infonet 15.0. I want to get the sum the total surveyed lengths, for each CCTV operator, for each date. So for example, Operator A did 400m on 12/01/16, Operator B did 20m on 12/01/16.......

    The following text is where I have got to, however my SQL skills area little rusty so I only get 1 surveyor per date when multiple crews have been out;

    select (surveyed_by) AS 'Surveyed By',
    SUM(surveyed_length) AS 'Surveyed Length (m)',
    SUM(pipe.length) AS 'Pipe Length (m)'

    group by
    DATEPART(when_surveyed) AS 'Date'

    If anyone can shed some light on this or post the code I should be using then it would be appreciated.
    Thanks in advance,

  2. #2
    This code gives me what I was after if anyone is interested:

    count(*) AS 'Count',
    SUM(surveyed_length) AS 'Length'

    group by
    DATEPART(when_surveyed) AS 'Date',(surveyed_by) AS 'Surveyor';

Posting Permissions

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