PC Review


Reply
Thread Tools Rate Thread

Where clause in DataTable.Select method

 
 
Matthew Towpik via DotNetMonster.com
Guest
Posts: n/a
 
      22nd Feb 2005
Just curious how I would include a WHERE clause in the filter string of the
Select method.

If I want to SELECT * FROM Column1 WHERE Column2 = SomeValue

thanks

--
Message posted via http://www.dotnetmonster.com
 
Reply With Quote
 
 
 
 
Marina
Guest
Posts: n/a
 
      22nd Feb 2005
What does 'From Column1' mean? You can't select from columns, only from
tables. And the table is always going to be the DataTable you are calling
the Select method on.

So the WHERE clause you have in the statement is already what you need.


"Matthew Towpik via DotNetMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Just curious how I would include a WHERE clause in the filter string of
> the
> Select method.
>
> If I want to SELECT * FROM Column1 WHERE Column2 = SomeValue
>
> thanks
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
amir massourian
Guest
Posts: n/a
 
      23rd Feb 2005
you can only select from a DataTable, and the expression passed to Select
would be the WHERE clause

myTable.Select("Column1 > 0 AND Column2 = 'Somevalue' ");

--
This posting is provided "AS IS", with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.





"Matthew Towpik via DotNetMonster.com" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Just curious how I would include a WHERE clause in the filter string of
> the
> Select method.
>
> If I want to SELECT * FROM Column1 WHERE Column2 = SomeValue
>
> thanks
>
> --
> Message posted via http://www.dotnetmonster.com



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Implementing SELECT DISTINCT with DataTable.Select method Andrea Caldarone Microsoft ADO .NET 2 30th Jan 2007 09:28 AM
Retrieving datarows using DataTable.Select method and adding it to new DataTable C.Anand via DotNetMonster.com Microsoft ADO .NET 4 4th Apr 2005 05:21 PM
DataTable.Select Method harry Microsoft VB .NET 5 15th Sep 2004 02:15 PM
DataTable.Select Method harry Microsoft Dot NET 5 15th Sep 2004 02:15 PM
Does the filterExpression of the Table.Select method understand the 'IN' Clause? Who knows? Where's the doco? Fergal O' Ceallaigh Microsoft ADO .NET 1 22nd Dec 2003 10:13 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:25 AM.