3 Replies Latest reply on Feb 19, 2016 11:26 AM by Rashmi

    SQL issue


      Hi ,


      We have PIPOINT defined on AF for some of the attributes currently and the data is reading from SMT OK. But when I run the below query, my sql does not fetch me correct archive values.

      For F4402T0001H0080, the archive values are shown for 4 columns, but the script output populating as NaN

      Again, I placed the same query inside powerhell script, the output values are displaying as NaN for all 3 windtowers.

      For the columns, pipoint has defined, should display me Archive values from SMT, and for other columns as NaN as they do not have Tag available. Instead for all 3 windtower , all attributes are populating as NaN.


      Please can anyone advise me if any problem with my sql query?

        • Re: SQL issue


          This is my query

            • Re: SQL issue
              Asle Frantzen



              If you use the TransposeArchive functions you'll get one line for each archive event present in your time period, for each element.

              In your case I see you've entered t.Time (I don't see where you get that from) as both start time and end time. As a result you'll only get values present in the archive at that specific time. It's ok to do this if you're certain all archive values are present at a certain time, for example midnight. But if the archive values are spread out at any time of the day, and you only request one specific time, you'll get empty results for all other columns.

              1 of 1 people found this helpful
                • Re: SQL issue

                  hi All,


                  Please ignore this query. There was an issue associated with correct variable name. I had to define a new varibale name and pass it onto query. it worked fine. Thanks you all.


                  Regards, Rashmi