Monday, 26 August 2013

Select count from datatable against dynamic query in c#

Select count from datatable against dynamic query in c#

I have a data set in memory which has two data tables in it.
Cont
Ins
Secondly i have separate data table (in memory) in which i have rows in
following format.
And suppose it has two rows. In actual it may have million of rows
ID Table Name Column Name
Operator value
1 Const ID
= 1
2 Ins app_ID
= 558877
As is: Now i get information from given rows and construct a query and
execute it in database server like:
Select count(*) from Cont.Id= 1 and Ins.app_id = 558877;
On the basis of above query result i have implemented my business logic.
Objective: In order to increase performance i want to execute query in
application server as now i have complete table in memory. how can i do
it.
Note: Tables name may vary according to data.

No comments:

Post a Comment