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
  1. Home
  2. General Programming
  3. C#
  4. missing operand ??

missing operand ??

Scheduled Pinned Locked Moved C#
helpquestion
2 Posts 2 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.
  • H Offline
    H Offline
    Hum Dum
    wrote on last edited by
    #1

    I created a DataTable thru coding and store some rows/data in it. After that I want to select "Distinct" data from this table.

    Datatable dt;
    //code for creating & adding data

    dt.Select("DISTINCT column1");//this givin error

    its saying ="Missing operand after column1 operator" I want to select DISTINCT rows from this dt table but its not working, I am using vs2003.

    T 1 Reply Last reply
    0
    • H Hum Dum

      I created a DataTable thru coding and store some rows/data in it. After that I want to select "Distinct" data from this table.

      Datatable dt;
      //code for creating & adding data

      dt.Select("DISTINCT column1");//this givin error

      its saying ="Missing operand after column1 operator" I want to select DISTINCT rows from this dt table but its not working, I am using vs2003.

      T Offline
      T Offline
      Torsten Mauz
      wrote on last edited by
      #2

      The DataTable has no built in support for this, you'll basically have to roll your own. Check out this article: Select DISTINCT on DataTable[^] Your other option would of course be to just grab all the rows using DataTable.Select() then de-dupe the returned array.

      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