473,385 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

using distinct in datatable

I'm trying to do distinct below in a datatable
but i get the error :-
Syntax error: Missing operand after 'Code' operator.
Any ideas?

string strExpr = "DISTINCT Code LIKE '%ve%'" ;
DataRow[] XmlRow = myTable.Select(strExpr);
Mar 15 '06 #1
1 1834
I not sure you can use DISTINCT in like that. The string param in Select()
is strickly a Where clause. I think you're going to have to remove the
DISTINCT.

Tony

"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:OB**************@TK2MSFTNGP10.phx.gbl...
I'm trying to do distinct below in a datatable
but i get the error :-
Syntax error: Missing operand after 'Code' operator.
Any ideas?

string strExpr = "DISTINCT Code LIKE '%ve%'" ;
DataRow[] XmlRow = myTable.Select(strExpr);

Mar 15 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Dianna | last post by:
I don't understand why the dataview or the dataset does not have a 'Select Distinct' option. They both can do so much to filter the data except that. The article Microsoft has 326176 works, but not...
2
by: Li Weng | last post by:
Hi, I use a DataView to display a State field. But some rows have the same state like 'OH'. How can I just display only one of them like SQL's DISTINCT? Can I use .rowfilter? How? I don't have...
1
by: Kevin Carter | last post by:
hi i have a table with several fields Field1(area), Field2(Quantity), Field3(cost), field4(date) area Quantity cost date office 10 50 6/4/04 gym...
2
by: Michael Howes | last post by:
I have a single DataTable in a DataSet. It has 4 columns and i'd like to get a handful of counts of unique items in 3 of the 4 columns. Can a DataTables Select or Compute methods to COUNT DISTINCT?...
6
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
3
by: Li Pang | last post by:
Hi, I want to know how to create a dataview from a datatable of DISTINCT data. Thank in advance
2
by: jvb | last post by:
I am trying to find a way, other than iterating through every row or requerring the database, to get the distinct values from a column in a datatable. Any help would be appreciated. Thanks.
5
by: =?Utf-8?B?dHZpbg==?= | last post by:
Hi everybody i have a datatable, i want to select distinct value from datatable and not database. so is there any method that can provide this query: Select DISTINCT from DataTable please help...
4
by: Lacutas | last post by:
Hi all, I am having some problems using LINQ to access Distinct records from a Dataset. I have looked around and believe it should be as simple as added .Distinct() to my LINQ query below, though...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.