Solved

MS excel database query

Posted on 2012-04-08
11
516 Views
Last Modified: 2012-04-16
Hi,

I am running a data base query into excel 2007 from access 2007.  I brought all the columns across from access into excel.  Is there a way to only bring across records that have data?

Thanks in advance.
0
Comment
Question by:Reyesrj
11 Comments
 
LVL 39

Assisted Solution

by:als315
als315 earned 100 total points
ID: 37822489
Yes, you can add criteria to your query:
.... WHERE MyfieldName is not NULL
0
 
LVL 17

Assisted Solution

by:Anuroopsundd
Anuroopsundd earned 100 total points
ID: 37822493
in the query you can specify that data not equal to null

1.On the Data tab, in the Get External Data group, click From Other Sources, and then click From Microsoft Query.
2.In the Choose Data Source dialog box, make sure that the Use the Query Wizard to create/edit queries check box is clear.
3.Double-click the data source that you want to use.

http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx
0
 

Author Comment

by:Reyesrj
ID: 37822530
Thanks for the reply,

I have 10 rows and 15 columns that came accross.  Only 3 rows and 5 columns have data.  Is there a way to only have those 3 rows and all the columns come accross?  Meaning to say, only bring accross the records that have data.
0
 
LVL 30

Assisted Solution

by:hnasr
hnasr earned 100 total points
ID: 37823762
Verify that the Access query outputs the expected records, then proceed to get data into Excel.
0
 
LVL 74

Assisted Solution

by:Jeffrey Coachman
Jeffrey Coachman earned 100 total points
ID: 37824832
Can you post a sample of this spreadsheet to avoid the "guesswork" of figuring out what you are calling "Rows that have data"

The question is how you are allowing "Empty" records in your Excel sheet?
This is why a sample file and an explanation of your system is always helpful...

Basically Access swill import all of the data in the sheet (the "List Range")
(There is no facility to tell Access what you think are "Empty" records and ignore them.)
Then you will have to filter out the "Non Blank" records in Access.
(Easy)

Either that or Filter the records in Excel first, then import the "Filtered list"
(More difficult)
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:Reyesrj
ID: 37826453
Please see that attached query result in excel.

Rows 5,6 and 9 have data in column c through M.  The outher rows do not have data.  So, is there a way to only bring accross records that have data in column c through 9?

Thanks
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 37827748
<Please see that attached query result in excel.>
Attached where?
0
 

Author Comment

by:Reyesrj
ID: 37828081
Sorry, I'm at home. I guess the attachment did not attach. I'll send it tomorrow.
Thanks.
0
 
LVL 9

Accepted Solution

by:
anthonymellorfca earned 100 total points
ID: 37834741
Powerpivot will do that in a point and click way.
0
 

Author Comment

by:Reyesrj
ID: 37835613
0
 

Author Closing Comment

by:Reyesrj
ID: 37853976
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now