Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Robin Hammond" wrote:
SELECT EmployeeName FROM my_table WHERE Salary <=10,000 AND Salary <= 20,000; Given that SQL is a description of the results sought, this is more descriptive and quite likely faster: SELECT EmployeeName FROM my_Table WHERE SALARY BETWEEN 10000 and 20000 How can I get only one HSBC and one Whavocia into Excel cell for a selection? SELECT Top 1 EmployeeName FROM my_table WHERE Bank = 'Wachovia' SELECT Top 1 EmployeeName FROM my_table WHERE Bank = 'HSBC' This gives two recordset objects; if the intention is to pick the distinct 'Bank' (there are two, Wachovia and HSBC), this will return the result is a single recordset & will cope with other distinct Bank names: SELECT Distinct(EmployeeName) FROM my_table GROUP BY Bank; |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Help Index tab | Setting up and Configuration of Excel | |||
SQL? Index? Excel? | Excel Discussion (Misc queries) | |||
Excel Addins - Index or key | Excel Programming | |||
Excel Addins - Index or key | Excel Programming | |||
Workbooks Index (Excel 97) | Excel Programming |