Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9209599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:52:54+00:00 2026-06-18T00:52:54+00:00

What i try to do is, counting my rows in this SQL statement, as

  • 0

What i try to do is, counting my rows in this SQL statement, as well as want to retrieve the data into the Repeater. This is ASP.NET / C#.

SELECT COUNT(*) AS 'numbersOfOrdres' 
FROM customers 
INNER JOIN orders ON customers.customer_id = orders.order_customer_id

Doesn’t seems to work, i’ll keep getting the error "Does not contain 'THEN MY FIELD NAME' in the Repeater.

EDIT:
Repeater code

<asp:Repeater ID="customerOrdersRepeater" runat="server">
<HeaderTemplate>
    <table>
    <tr>
        <td><b>Customer name</b></td><td><b>Customer adresse</b></td><td>Numbers of orders</td>
    </tr>
</HeaderTemplate>
<ItemTemplate>
    <tr>
        <td><%# Eval("customer_name") %></td><td><%# Eval("customer_adresse") %></td><td><%# Eval("numbersOfOrdres") %></td>
    </tr>
</ItemTemplate>
<FooterTemplate>
    </table>
</FooterTemplate>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:52:56+00:00Added an answer on June 18, 2026 at 12:52 am

    You would need to aggregate your results using GROUP BY. It looks like you want a row per unique customer/customer address. So assuming these are held in customers.name and customers.adresse your query would be

    SELECT customers.name AS customer_name, customers.adresse AS customer_adresse, 
        COUNT(*) AS 'numbersOfOrdres' 
    FROM customers 
    INNER JOIN orders ON customers.customer_id = orders.order_customer_id
    GROUP BY customers.name, customers.adresse
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm investigating Zend Framework and currently stucked in counting resulting rows of sql query...
I want to insert a row number in a records like counting rows in
Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]
Try this piece of code - public class WhitespaceTest { public static void main(String[]
try: recursive_function() except RuntimeError e: # is this a max. recursion depth exceeded exception?
I'm using SQLBULKCOPY to copy some data-tables into a database table, however, because the
I'm try counting the number of lines in a file which 4th field is
Another problem I try to solve ( NOTE this is not a homework but
I am having this error message when I try to deploy my application on
I want to try and keep a timer synchronized across multiple browsers/clients which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.