1 Reply Latest reply on Jun 14, 2012 1:44 PM by Steven Klassen

    Advanced SQL Queries in Report Writer


      I have a report that gives me the information from a node over a period of time based on polled information.  The problem I am having is that the information the poller receives is text and I need an integer.  So what I was going to do is modify the SQL of the report to from this:


      CustomNodePollerStatistics_CustomPollerStatistics.Status AS Status


      To this:


      SUBSTRING(CAST(CustomNodePollerStatistics_CustomPollerStatistics.Status AS VARCHAR(27)),1,1)  AS Status,


      Now instead of returning a string with info like: xxxx XX xxxxx 92 I am just getting "Up" as a return value.  If I change SUBSTRING to 2 or above it changes from "Up" to "Unkown".  What is happening here?  Why is SUBSTRING not pulling out the specific characters I want?


      Also, what is CustomNodePollerStatistics_CustomPollerStatistics and where does it come from?  I notice things like this around and can't figure them out.  I don't see a table or a view they represent in my database.


      Thanks for any help.