Problwm with dbr.calc on MSSQL

(7 posts) (2 voices)

Tags:

  1. chiacy, Member

    I have the following

    select 'dbr.title','Summary'
    select 'dbr.calc','[percentrn]','[r/n]/[r/n.sum]*100'
    select 'dbr.colstyle','[percentrn]','%.2f %'
    select 'dbr.calc','[percentbc]','[Base_cost]/[Base_cost.sum]*100'
    select 'dbr.colstyle','[percentbc]','%.2f %'

    select 'dbr.sum','r/n','Base_cost'
    select 'dbr.avg','r/n','Base_cost'
    select 'dbr.summary_options','skip_single_line_summary'

    select
    Market,
    [r/n],
    [percentrn]=null,
    [Base_cost],
    [percentbc]=null
    from (

    select
    Market,
    sum(room_nights) as [r/n],
    sum(base_cost) as [Base_cost]
    from @temp_production
    group by Market
    ) a
    order by Market

    and the result shows

    Summary
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum
    Unknown column reference: r/n.sum
    Unknown column reference: Base_cost.sum

    Wonder where is going wrong

  2. myDBR Team, Key Master

    Hi,
    what is the myDBR version and the build you are using?

    --
    myDBR Team

  3. chiacy, Member

    Community edition, version 4.0.0

  4. myDBR Team, Key Master

    The code syntax looks ok and it should work. You can clean up the code a bit by removing the extra select level, but the code should work. 'skip_single_line_summary' does not do anything as you are not using header levels.

    You did not tell which build are you using so you could try run the updater.

    --
    myDBR Team

  5. chiacy, Member

    thanks. How to get the updater? can run from within the web browser or have to dive into the system, i.e. via console?

  6. myDBR Team, Key Master

    Automatic updater works through the browser.

    Log in as admin. In Admin Tools click "About / Update" and then "Update now...".

    --
    myDBR Team

  7. chiacy, Member

    This is working after updating accordingly


Reply

You must log in to post.