Crosstab not working

(3 posts) (2 voices)
  1. Selvi, Member

    I can not get crosstab to working. "dbr.crosstab" is not recognized as a command at all. (I was wondering if "crosstab" is part of basic "community" edition of myDBR at all.) Please refer to the code below:

    ------------------
    DROP PROCEDURE IF EXISTS sp_DBR_test_selvi
    $$
    CREATE PROCEDURE

    _
    ()
    BEGIN
    select 'dbr.crosstab', 3;
    select NAME as 'NAME',
    CS_MODEL as 'CS_MODEL',
    SITE as 'SITE'
    from reporting_db.MACHINE_LOC;

    END
    $$

    I call this procedure using:
    call sp_DBR_test_selvi()
    ------------------

    The query results show 2 different result sets as below:

    02:21:20 pm: Query execution time at: 0.13 sec

    dbr.crosstab 3
    dbr.crosstab 3

    NAME CS_MODEL SITE
    NYCCxxxx OptiPlex xx222 NY
    .
    .
    .

  2. myDBR Team, Key Master

    Cross tabulation is enabled also in Community edition.

    In your example you are attaching the crosstab to the last column and the command is therefore ignored. Cross tabulation column needs to leave column(s) in right as data column(s) and column(s) in left as header column(s).

    See examples at: http://mydbr.com/doc/index.html?c_crosstab.html

    --
    myDBR Team

  3. Selvi, Member

    Thank you for pointing this out. It works now!

    I am still new to myDBR and trying to find my way!


Reply

You must log in to post.