Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. how to filter distinct row from DataView

how to filter distinct row from DataView

Scheduled Pinned Locked Moved ASP.NET
csharphelptutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krishnaveer
    wrote on last edited by
    #1

    I have the following line of code (.NET 2.0): myDataView.RowFilter = "SELECT DISTINCT Auto"; where Auto is one of my column names. This throws the following exception: Syntax error: Missing operand after 'DISTINCT' operator. Any suggestions on what this is really trying to tell me?

    krishna veer singh

    A S N 3 Replies Last reply
    0
    • K krishnaveer

      I have the following line of code (.NET 2.0): myDataView.RowFilter = "SELECT DISTINCT Auto"; where Auto is one of my column names. This throws the following exception: Syntax error: Missing operand after 'DISTINCT' operator. Any suggestions on what this is really trying to tell me?

      krishna veer singh

      S Offline
      S Offline
      Satish Mahapatra
      wrote on last edited by
      #2

      write like select distinct(auto)

      K 1 Reply Last reply
      0
      • K krishnaveer

        I have the following line of code (.NET 2.0): myDataView.RowFilter = "SELECT DISTINCT Auto"; where Auto is one of my column names. This throws the following exception: Syntax error: Missing operand after 'DISTINCT' operator. Any suggestions on what this is really trying to tell me?

        krishna veer singh

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        for distinct use myDataView = myDataView.ToTable(true,"ColName").DefaultView; :rose::rose::rose:

        Abhishek Sur

        1 Reply Last reply
        0
        • S Satish Mahapatra

          write like select distinct(auto)

          K Offline
          K Offline
          krishnaveer
          wrote on last edited by
          #4

          I try but its not working....

          krishna veer singh

          1 Reply Last reply
          0
          • K krishnaveer

            I have the following line of code (.NET 2.0): myDataView.RowFilter = "SELECT DISTINCT Auto"; where Auto is one of my column names. This throws the following exception: Syntax error: Missing operand after 'DISTINCT' operator. Any suggestions on what this is really trying to tell me?

            krishna veer singh

            N Offline
            N Offline
            N a v a n e e t h
            wrote on last edited by
            #5

            You can't have SQL statements in RowFilter expression. Please read[^] the documentation. :)

            Navaneeth How to use google | Ask smart questions

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups