Skip to Content
avatar image
Former Member

Item Properties Query - Column Header

Hi Experts,

I've loaded the following query, but cannot seem to appropriately name the column headers as I'd like. Instead of "Property 1" I would like the column header to reflect the user-defined name i.e. "The Bruery". I've searched the discussion groups and have not found a solution for this yet. I've copied my query below, as well as a screen shot of what I'm trying to accomplish. Any suggestions/help would be greatly appreciated. Cheers!

SELECT "U_ORC_BE_ShortCode", "ItemCode", "ItemName", "QryGroup1", "QryGroup2", "QryGroup3" FROM OITM "QryGroup1" CROSS JOIN OITG "ItmsGrpNam" WHERE "QryGroup1" = 'Y' AND "ItmsTypCod" = '1' OR "QryGroup2" = 'Y' AND "ItmsTypCod" = '1'

Andrew

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jun 14, 2017 at 05:42 PM

    You could use an alias in your field like below, I just added for the first property. Another solution would be doing some kind of join with the OITB table, a little bit more complicated, I would have to think more about it.

    SELECT "U_ORC_BE_ShortCode", "ItemCode", "ItemName", "QryGroup1" AS 'The Bruery', "QryGroup2", "QryGroup3" FROM OITM "QryGroup1" CROSS JOIN OITG "ItmsGrpNam" WHERE "QryGroup1" = 'Y' AND "ItmsTypCod" = '1' OR "QryGroup2" = 'Y' AND "ItmsTypCod" = '1'

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 14, 2017 at 05:49 PM

    Thanks, Danilo! This works perfectly. Much appreciated.

    Add comment
    10|10000 characters needed characters exceeded