473,386 Members | 1,958 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,386 software developers and data experts.

SELECT TOP query - in datatables

Is a SELECT TOP query allowed in filtering rows from a
datatable? If it is not, is there any other easy way to
filter a given number of rows from a datatable? Thanks a
lot for your help.
Nov 16 '05 #1
3 4988
wrote:
Is a SELECT TOP query allowed in filtering rows from a
datatable? If it is not, is there any other easy way to
filter a given number of rows from a datatable? Thanks a
lot for your help.


it depends on the database...
some database support this feature (like SQL-Server, Oracle), and some does
not (like MS-Access).

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
Nov 16 '05 #2
Thanks for your reply. But, my question is can I write a
SELECT TOP query in C# to filter rows from my datatable?
(not from my SQL server database). Thank you.
-----Original Message-----
wrote:
Is a SELECT TOP query allowed in filtering rows from a
datatable? If it is not, is there any other easy way to
filter a given number of rows from a datatable? Thanks a lot for your help.
it depends on the database...
some database support this feature (like SQL-Server,

Oracle), and some doesnot (like MS-Access).

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
.

Nov 16 '05 #3
According to

http://msdn.microsoft.com/library/de...ssiontopic.asp

DataTable.Select does not support the TOP keyword. Looks like you'll have
to implement it yourself.

<an*******@discussions.microsoft.com> wrote in message
news:1a*****************************@phx.gbl...
Thanks for your reply. But, my question is can I write a
SELECT TOP query in C# to filter rows from my datatable?
(not from my SQL server database). Thank you.
-----Original Message-----
wrote:
Is a SELECT TOP query allowed in filtering rows from a
datatable? If it is not, is there any other easy way to
filter a given number of rows from a datatable? Thanks a lot for your help.


it depends on the database...
some database support this feature (like SQL-Server,

Oracle), and some does
not (like MS-Access).

--
Greetings
Jochen

Do you need a memory-leak finder ?
http://www.codeproject.com/tools/leakfinder.asp

Do you need daily reports from your server?
http://sourceforge.net/projects/srvreport/
.

Nov 16 '05 #4

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

Similar topics

3
by: | last post by:
Is a SELECT TOP query allowed in filtering rows from a datatable? If it is not, is there any other easy way to filter a given number of rows from a datatable? Thanks a lot for your help.
3
by: gh | last post by:
I have made the following stored procedure with the following select statement select * from user select * from order, orderdetail where order.id=orderdetail.id I know I can uses DataReader...
5
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table...
1
by: Ronald S. Cook | last post by:
Let's say I have 2 ADO.NET DataTables (tblAuthor and tblBook) within an ADO.NET DataSet (dstPublish). tblAuthor has DataColumns AuthorID and AuthorName, tblBook has DataColumns BookID,...
7
by: Marchetto | last post by:
Hi all. I thought that it was a FAQ.... but I can't find answer so i post in this NG. I have a dataset with two datatables (dt1 and dt2) in my application. I'd like to know if there is a...
4
by: reidarT | last post by:
I have a dataset with 2 tables. I have madee a query of theese 2 tables. When I look at the datasources the query is not shown. How do I make a form with the query as source? reidarT
5
by: njb35 | last post by:
Hi all I'm beginning my foray from VBA into VB 2005 Express, and enjoying some of the efficiencies it provides! I'm stuck with some dataset handling however that I _think_ can be automated but...
3
by: =?Utf-8?B?UmljaCBIdXRjaGlucw==?= | last post by:
I'm not really sure how to ask this question because I'm still getting my feet wet with data access and VB.NET, but here goes: To start off with, I'm using VB 2005 Express to connect to an Access...
0
by: Satish | last post by:
Hi everyone, I need some help constructing a linq query on datatables. I have 2 datatables as follows RangeTable MinValue MaxValue 0.00 0.050 0.051 0.10 0.101 0.15 0.151 0.20
8
by: TimVtoo | last post by:
Hi all and thanks for looking. I need to make the move from ASP to ASP.NET, and as my sister has aked me to knock up a website for her, I thought this could be a nice starter project to help me...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.