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

SQL query on in-memory data

Hi
I need to read data from flat files in memory and execute SQL query on
the in-memory data. I do not have an option of using a database and I
am using c# .Net to build my application. Does anyone know whether it
is possible to make SQL query on datasets or on XML data for that
matter. Or is there a third party tool which can help me with this.

thanks
Ajay

Dec 13 '05 #1
7 2651
Well, it's not exactly SQL, but you can take a look at
DataTable.Select().

Arbitrary, SQL-like expressions will be possible in C# 3.0 with LINQ,
but even then you will be writing them in code, rather than parsing a
SQL expression.

Does it have to be a SQL query? Or are you just looking for the same
effect: searchable data?

When you say that you don't have the option to use a database, do you
mean that you can't use a database in any way in your program, or just
that the data is in flat files? If it's the latter, and you really need
to execute true SQL queries, could you not read the information from
the flat files, drop it into SQL Express temporarily, just for the
purposes of your program, and then query it there? Then you could just
delete the database copy when you're done.

Dec 13 '05 #2
"Bruce Wood" wrote:
Well, it's not exactly SQL, but you can take a look at
DataTable.Select().

Arbitrary, SQL-like expressions will be possible in C# 3.0 with LINQ,
but even then you will be writing them in code, rather than parsing a
SQL expression.

Does it have to be a SQL query? Or are you just looking for the same
effect: searchable data?

When you say that you don't have the option to use a database, do you
mean that you can't use a database in any way in your program, or just
that the data is in flat files? If it's the latter, and you really need
to execute true SQL queries, could you not read the information from
the flat files, drop it into SQL Express temporarily, just for the
purposes of your program, and then query it there? Then you could just
delete the database copy when you're done.

that is not a good solution. you should use the ODBC driver to query
against flat files.

Dec 13 '05 #3
Thanks for correcting me. I wasn't aware that ODBC could do that "out
of the box," as it were.

Dec 13 '05 #4
Hi,

Just give a little more details about the files struct

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"ajay" <aj*********@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
Hi
I need to read data from flat files in memory and execute SQL query on
the in-memory data. I do not have an option of using a database and I
am using c# .Net to build my application. Does anyone know whether it
is possible to make SQL query on datasets or on XML data for that
matter. Or is there a third party tool which can help me with this.

thanks
Ajay

Dec 13 '05 #5
how is it possible to execute SQL query on a flat database using ODBC?
My queries are mostly for data manipulation (like using dyanamic
queries for creating new fields by making use of existing fields ) , so
plain select functionality of datasets won't at all be sufficient.
Can anybody tell me how can I make use of XQuery ?

rgds

Dec 15 '05 #6
can you write the data to a temp file in CSV format and let ODBC read it?

ajay wrote:
how is it possible to execute SQL query on a flat database using ODBC?
My queries are mostly for data manipulation (like using dyanamic
queries for creating new fields by making use of existing fields ) , so
plain select functionality of datasets won't at all be sufficient.
Can anybody tell me how can I make use of XQuery ?

rgds

Dec 15 '05 #7
well yes doing that won't be a problem if that would enable me to
manipulated data dynamically using the queries.
How do you suggest I can do that?

Dec 15 '05 #8

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

Similar topics

3
by: Mike Cocker | last post by:
Hello, I'm quite weak at PHP, so I was hoping to get some help understanding the below code. First off, I'm trying to create a "query form" that will allow me to display the results on my...
13
by: dogu | last post by:
Noob alert. Code is below. File is saved as a .php. What I'm trying to do: User uses 'select' box drop down list to pick a value. Value ($site) is derived from a db query. This works fine....
0
by: ChangAya | last post by:
I use binary log on mysql system. Yesterday i found some hacking attempt on my machine. ( I found some unknown queries on binary log) But i don't get any information about hacking query...
1
by: greg.kujawa | last post by:
I am passing along an Index Server 2.0 query though URL strings calling the ASP. I am searching for records by a person's last name and their phone number. Something like: ...
3
by: krystoffff | last post by:
Hi I would like to paginate the results of a query on several pages. So I use a query with a limit X offset Y to display X results on a page, ok. But for the first page, I need to run the...
3
by: Jamie Pittman via AccessMonster.com | last post by:
I am having trouble bellow wit this query. I have the total regular hours and the overtime. The problem is that if it is 8 hours and under, I need it to show as regular hours. Any thoughts? ...
2
by: laredotornado | last post by:
Hello, Using PHP 4 and MySQL 4, how would I write a function such that it takes a valid MySQL query, and a column on which to order the query, and return a new query ordered by that column? ...
2
by: yxktmp | last post by:
Hi; I have a main starting query for most of my reporting. I branch out from this query to other queries. This main query contains multiple form control filters (query criterias) . I want to use...
14
by: gert | last post by:
Why does query = www ? int main(void) { char *user="www"; char *password=""; char *database="www"; char *query={"SHOW DATABASES;"}; db(user,password,database,query);
20
by: Guillaume Dargaud | last post by:
I must be tired tonight: $query="SELECT * FROM ImageList WHERE Name='$value'"; $result=mysql_query($query, $DB) or die(mysql_error()); if ($result) { $InContext=mysql_fetch_assoc($result);...
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
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.