Jered

Jered

  • NA
  • 1
  • 0

Advanced queries on DataSet object...

Apr 1 2006 11:30 AM
I have a DataTable that is populated from a CSV file at app startup and
I need to be able to perform an advanced query on the DataTable such as
the following:

DECLARE @Pressure float
DECLARE @Temperature float
SET @Pressure=11.2
SET @Temperature=92.3

SELECT Value,Pressure,Temperature
FROM DewPointValues
WHERE Pressure IN ((SELECT MAX(Pressure)
                    FROM DewPointValues
                    WHERE Pressure <= @Pressure),
                   (SELECT MIN(Pressure)
                    FROM DewPointValues
                    WHERE Pressure >= @Pressure))
AND Temperature IN ((SELECT MAX(Temperature)
                     FROM DewPointValues
                     WHERE Temperature <= @Temperature),
                    (SELECT MIN(Temperature)
                     FROM DewPointValues
                     WHERE Temperature >= @Temperature))

How can I do this with ADO.NET 2.0?  I've been bumping my head for few
hours???

Thanks!