MSquery from SQL, ignore record?

mjfmn

New Member
Joined
Mar 5, 2003
Messages
8
I am trying to figure out MSquery to get data from a new sql database in our system. When I bring in data from the selected table, I want it to ignore any records where last_user=Convert and tran_type=Balance. I can't quite figure out how to get it to look at both of these instead of each one individually. Currently I'm using the wizard in Excel 2007, but I can start working without it as well. Any help is appreciated - thank you!
Mike
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I'll bump this if you don't mind - anybody? I can't just bring all the data in and have the user delete out the records with this info, they don't have much of a "comfort level" to make changes like that. Thanks again!
Mike
 
Upvote 0
I'm not very familiar with the "Access" icon in the data tab - I know you see Access tables as options to import. Possibly if you create an Access query you would see it too, and would be able to import the query results (in this case, you'd create the query in Access first, per your specs).

If the Access button in Excel 2007 only lets you bring in tables, the other options is to go to the "from other sources" button and bring in the data as part of an MSQuery data source. There's actually many ways to go about this but I found what looks like a very good, easy to follow tutorial:
http://www.java2s.com/Tutorial/Micr.../0260__Collaboration/CreateaDatabaseQuery.htm

Give it a shot and see if you succeed. If not, post back with your further woes. You'd probably also find more hits googling "excel 2007 data query" and/or other keywords like "access", "create", "external data", "msquery", "data connections", "query table", "querytable" (sorry to be so precise --> now you know more about how I think when googling).

ξ
 
Upvote 0

Forum statistics

Threads
1,224,538
Messages
6,179,412
Members
452,912
Latest member
alicemil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top