ATTN SQL Gurus: Data Roll Up

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default ATTN SQL Gurus: Data Roll Up

    The data: Department Name Sales Rich Marketing Tom Marketing Dave
    Sales Gary The intended result Department Name Sales Rich<br>Gary
    Marketing Tom<br>Dave This can be down with some looping, structures, and
    arrays. It just does not seem very elegant to loop through the data more than
    once. Is there a SQL statement that can give me the intended results above?
    Some sort of Aggregate (sp?) function? We are using Oracle 8.1.7.4 -- Rich

    Rich_Willmore Guest

  2. Similar Questions and Discussions

    1. getLinks & VB.NET - Gurus, please help!!!
      I am trying to use VS2005 (VB.NET) & the Acrobat SDK to do the following... - open a PDF - search each page for weblinks and read the target URL...
    2. Any DataGrid Gurus out there?
      Hi How can I force a DataGrid into Edit Mode from Page_Load? How can I call the ItemCommand from Page_Load? Can I have a hidden CommandButton...
    3. Calling PHP gurus
      It's nice to see all the support in this newsgroup. Hopefully I'll be a contributor soon. For now I'm hoping you could answer a question about...
    4. Question to all ASP GURUS
      Hi all Is there any way I can copy one folder from one place to another place over the internet.... Kind regards
    5. Hey layers gurus-need an eye here
      This is my first "real" attempt at using layers. www.billraydrums.com/7_19_03/new.htm Please take a look-see and give me some hints as to how...
  3. #2

    Default Re: ATTN SQL Gurus: Data Roll Up

    It's pretty simple with cfoutput.

    Select department, name from xxx order by department, name

    <cfoutput query="yourquery" group="department">
    #department#
    <cfoutput>
    #Name#
    </cfoutput>
    </cfoutput>

    OldCFer Guest

  4. #3

    Default Re: ATTN SQL Gurus: Data Roll Up

    You are very much correct. I keep forgetting about that attribute in CFOUTPUT.
    Nesting CFOUTPUTs in any fashion just doesn't strike a cord with me I suppose.
    Thanks for the reply. A friend of mine did offer a SQL server solution but it
    was very 'loopy'. Too much work for something that can be accomplished with
    cfoutput grouping. -- Rich

    Rich_Willmore Guest

  5. #4

    Default Re: ATTN SQL Gurus: Data Roll Up

    *continuing to eat my shoe*. +1 for the GROUP attribute on CFOUTPUT. The code is so much cleaner and faster now.

    -- Rich
    Rich_Willmore Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139