You must Sign In to post a response.
  • Category: ASP.NET

    Need to show the data for one time in asp.net

    i have same data for 50 times in sql i use select query but it show s all the data i need to show it for one time any idea
  • #759535

    Hi Selvi.

    Provide more information regarding your query.
    What actually the requirement is?

    If you have same records many times but if you want to show only one of it by using select statement, then try

    Select distinct column name
    from tablename

    With in the IsPostBack property.
    Regards.

    Sridhar Thota.
    DNS Member.
    "Hope for the best..Prepare for the worst.."


    Sridhar Thota.
    Editor: DNS Forum.

  • #759537
    i forgot it thanks for your reply

  • #759538
    Hi Selvi.

    You are welcome. Thanks for acknowledging.

    Regards.

    Sridhar Thota.
    DNS Member.
    "Hope for the best..Prepare for the worst.."

    Sridhar Thota.
    Editor: DNS Forum.

  • #759544
    you can use distinct keyword to get unique value from a specific column.
    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #759575
    Hello Selvi,

    You can use DISTINCT Keyword to reduce duplicate rows in view while executing SQL Query.

    Example :

    SELECT DISTINCT column_name,column_name
    FROM table_name;

    SELECT DISTINCT City FROM Customers;

    Hope this will help you.

    Regards,
    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"


  • Sign In to post your comments