?
Solved

ODBC Query to Access Database Won't Filter Correctly

Posted on 2013-06-04
4
Medium Priority
?
799 Views
Last Modified: 2013-06-11
I created an ODBC query into my Access Database. I am using Excel 2003. When i create a query, I have multiple columns. I am trying to filter those columns through Excel to see the data I am looking for. Lets say in Column A are dates. And lets say I have 100 rows of data. Lets say i want to filter those dates Ascending. Also, not all rows have dates. That should be a problem. So, when I sort Column A Ascending, it sorts only 10 rows, then there are 50+ blank cells without dates, but then, there are more dates that didn't filter with the other dates at the top. Why wouldn't all the dates filter together? Why is there a gap in the dates? This data is upated constantly and more rows are being generated daily. So i need this filter to keep in Ascending order and catch the new data being queried. Any thoughts/suggestions??? Thanks!!!!!
0
Comment
Question by:brasiman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Assisted Solution

by:Steve
Steve earned 800 total points
ID: 39221242
You could sort the data in the SQL using an ORDER BY clause

How have you aquired the data, using MS Query?
If you use Data > From other Sources > MS Query it can be easier to handle the data.
In 2007+ it automatically puts the data into a table which makes life easier, I cannot remember if it does similar for 2003... but it should define the whole area for filtering.

ATB
Steve.
0
 
LVL 16

Accepted Solution

by:
Jerry Paladino earned 1200 total points
ID: 39221697
Check the format of the dates that are being returned to Excel from your query.   It is possible that Excel is interpreting some of them as actual dates and others as text strings.  In other words, Excel cannot resolve the date format on some of the records being returned.  

As a test, format the date column as numbers instead of dates.   The ones that are being interpreted as actual dates should be in the 41,400 range of number (01-Jun-2013 = 41,426).   Any date strings that Excel cannot resolve will remain as text strings and not display as numbers.   If this is the case, you will need to restrict how dates are entered into the Access database so a valid date format it used.
0
 

Author Comment

by:brasiman
ID: 39222869
I am running Excel 2003. So I go to Data, Import External Data, New Database Query. The query does not automatically put the data into a table. That is what i think the problem is. How do i get it so the data is automatically put in a table?

I will look at the date formats now.

Any thoughts on how to get the data in a table automatically?
0
 
LVL 16

Expert Comment

by:Jerry Paladino
ID: 39222965
Tables were introduced in Excel 2007.  Excel 2003 (and earlier) has Excel Lists which do not have all the same functionality of the Excel Tables that are in 2007/2010/2013.   The output from the Excel query is creating an Excel list in 2003.   The dates will function the same in an Excel List and in an Excel Table.   No difference.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question