Solved

ODBC Query to Access Database Won't Filter Correctly

Posted on 2013-06-04
4
775 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 200 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 300 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
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…

762 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