Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

how to output to correct month and year using group?

New Here ,
Jun 06, 2014 Jun 06, 2014

   From the query GetTotalStars i get the correct data:

resulst_1.PNG

So right now im oupting the results depending on the month , and i have another query that

gets me the months:

months.PNG

select distinct [month] from GetTotalStars order by [month],

But the problem is that is not all the totalstars is outputing to the correct month.

How will i be able to output the results in the correct month and year,

since right now i only have 2014 data, but obviously someday i will have 2015.

so will be like having two different tables 2015 and 2014.

<thead>

        <tr>

            <th>Department</th>

            <cfoutput query="qryMonths">

                <th>#MonthAsString(qryMonths.month)#</th>

            </cfoutput>

        </tr>

    </thead>

        <tbody>

            <cfoutput query="GetTotalStars" group="csedept_name">

                <tr>

                    <td >#GetTotalStars.csedept_name#</td>

                    <cfoutput group="month" >

                        <td>#GetTotalStars.totalstars#</td>

                    </cfoutput>

                </tr>

            </cfoutput>

        </tbody>

    </table>

281
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 06, 2014 Jun 06, 2014

@no_name_123,

This looks like the same question that was posted on StackOverflow here.  Did none of the answers already provided there solve your problem?  If not, then you need to add comments there explaining why - then the people already invested in providing assistance can fine tune their answers for your and any future user's benefit.

Cross-posting to multiple forums without referencing the other posts is generally considered poor form.  It's fine cross-posting if you don't get a response in the other forums, or if you simultaneously cross-post and then provide links to the other posts, but please don't waste people's time cross-posting if you already getting assistance elsewhere.


Thanks,

-Carl V.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2014 Jun 07, 2014

@No_name_123

There you go again. You seem to focus only on what you want to have, and rarely acknowledge the suggestions you receive. You not only withhold information, you have the habit of creating a lot a duplication, hence waste.

Please, have some manners and learn to share. As Carl says, discussions that share sources and contain as much information as possible will help others, besides just you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 07, 2014 Jun 07, 2014
LATEST

I have had a look at your previous posts. The following code will give you the value of the current year dynamically:

<cfoutput>#year(now())#</cfoutput>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources