Html Results for computed value

  • Hi All,

    I am trying to create web asst job to show the results of my query which in the end follow the computed value also but the html is only showing me select results not the computed values.I check in QA and its give me the results but why the same scripts not showing the results in html.

    Note (html showing only the compute values column names)

    ----*******----

    select distinct

     operator Name,

     convert(varchar(8),starttime,11) Date,

     sum(KeyStrokes) Keys,

     sum(ActKeyStrokes) ActKeys,

     sum(NumOfLines) Lines,

     sum(ActNumofLines) ActLines

    from

     dataSummary

    group by

     operator,convert(varchar(8),starttime,11)

    order by

     operator,convert(varchar(8),starttime,11)

    compute

     avg(Sum(keystrokes)),

     avg(sum(actkeystrokes)),

     avg(cast(((cast(sum(actkeystrokes) as real))/(cast(sum(keystrokes) as real))*100) as int))

     by

     operator

     -----*****-----

    Any help will be highly appreciated

  • Your SQL actually returns multiple Recordsets. For ADO use the NextRecordset method:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmthnextrec.asp

    More on ADO and multiple recordsets:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdconreceivemultiplerecordsets.asp

    Andy

     

  • Hi Andy,

    I tried that but the same results coming when I set web asst job.It showing me the select results and only the column name for compute value.

    Any suggesions

    Thanks

    ZIA

     

     

  • This is the same as my post in other thread

    I am surprised that you get any result since there is an error in your query

    COMPUTE clause #1, aggregate expression #3 is not in the select list

    caused by avg(cast(((cast(sum(actkeystrokes) as real))/(cast(sum(keystrokes) as real))*100) as int))

    (you can only compute columns in the select)

    You do know, I presume that the use of COMPUTE will give you an additional recordset

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply