Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.charting
|
|||
|
|||
how can i query an sheet with a where clause....from c# code using
hello ,
i'm triing to retreive buch of row but i want to apply a Where clause, so i get row = a certain date..... but my Query retreive only 1 row always(the first one)...but several should match... i even set the col format to string and still get only 1 row and got no syntax error.. ex: THE SQL PARM LOOKS LIKE : "SELECT F12 AS [Strategy], F5 AS [Quantite], F7 AS [Devise], F2 AS [Portefeuille], F4 AS [Ticker], F1 AS [Date], F3 AS [TradeType], F9 AS [Status], F10 AS [Courtier], F8 AS [Commision], F11 AS [Commentaire], F6 AS [Prix] FROM [2002$] WHERE F1 ='11/28/2005' " Method call: public DataTable Select(string sql) { OleDbDataAdapter da = new OleDbDataAdapter(sql, _connection); DataTable dt = new DataTable(); da.Fill(dt); return dt; } Anything wrong with the where clause..??? i even put the col format has string and copy the exact string im looking for in the col ...but the query still returning only 1 row (the first one).... and should be way more. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
lock tab in sheet 2 until cell in sheet one is completed | Excel Worksheet Functions | |||
vb code - Automatic transfer of data from one sheet to another | Excel Worksheet Functions | |||
Sheet Protection and VBA Code | Excel Discussion (Misc queries) | |||
how can i select all the cells with same color on a sheet if there are multipale colors by vba code | Charts and Charting in Excel | |||
Problem Code: Retrieving Stored Access 03 Query | Excel Discussion (Misc queries) |