ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Filtering ODBC data (https://www.excelbanter.com/excel-programming/321484-filtering-odbc-data.html)

Huwbert

Filtering ODBC data
 
I have created an ODBC link into an SQL server using the Import External Data
function in Excel 2003. The data is coming through without any problems
except that there is too much of it. Excel has a limit of 65,000 lines and
there is around 300,000 lines of data trying to get through, and the data I
want is at the bottom.

I want to put a filter on one of the columns in the table but don't know
how. I can see the Edit Query box but i've never really used SQL before.

Can anybody help?

Fredrik Wahlgren

Filtering ODBC data
 

"Huwbert" wrote in message
...
I have created an ODBC link into an SQL server using the Import External

Data
function in Excel 2003. The data is coming through without any problems
except that there is too much of it. Excel has a limit of 65,000 lines

and
there is around 300,000 lines of data trying to get through, and the data

I
want is at the bottom.

I want to put a filter on one of the columns in the table but don't know
how. I can see the Edit Query box but i've never really used SQL before.

Can anybody help?


What does the query look like? The usual way to limit the nuber of records
is to use the WHERE statement.

/Fredrik



Tom Ogilvy

Filtering ODBC data
 
In MSquery, there is an option in the menus to add a criteria. Use that
option.

--
Regards,
Tom Ogilvy

"Huwbert" wrote in message
...
I have created an ODBC link into an SQL server using the Import External

Data
function in Excel 2003. The data is coming through without any problems
except that there is too much of it. Excel has a limit of 65,000 lines

and
there is around 300,000 lines of data trying to get through, and the data

I
want is at the bottom.

I want to put a filter on one of the columns in the table but don't know
how. I can see the Edit Query box but i've never really used SQL before.

Can anybody help?




Rob van Gelder[_4_]

Filtering ODBC data
 
You will need to tweak the SQL.

From the MS Query menu, View, Criteria.
A section should appear for you to filter the results.

This effectively generates the WHERE clause in your SQL.

So the SQL query will look something like
select client_name, client_address from client_table where client_name =
'Huwbert';

If you are feeling confident with SQL (or even if you're just curious) check
out my Query Editor Add-In - on my website.
It gives more control over these QueryTables - especially over Parameters.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Huwbert" wrote in message
...
I have created an ODBC link into an SQL server using the Import External
Data
function in Excel 2003. The data is coming through without any problems
except that there is too much of it. Excel has a limit of 65,000 lines
and
there is around 300,000 lines of data trying to get through, and the data
I
want is at the bottom.

I want to put a filter on one of the columns in the table but don't know
how. I can see the Edit Query box but i've never really used SQL before.

Can anybody help?





All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com