Query Excel work book and SQL Database

evanwiley

New Member
Joined
Dec 18, 2008
Messages
7
ok i am going nuts. I have a cell that i want to put the date into in excel. I am using Excel 2003 but can goto excell 2007 if needed.

Enter number of days to Query: (They enter 3)
Cell A2: I created a cell that is now()-3

Now i want the filter customers_info_0.customers_info_date_account_created to be >= A2 in workbook.

is there an easy way to do this?


SQL Query:
SELECT customers_info_0.customers_info_date_account_created, customers_0.customers_lastname, customers_0.customers_firstname, address_book_0.entry_street_address, address_book_0.entry_city, address_book_0.entry_state, countries_0.countries_name, address_book_0.entry_postcode, orders_0.cc_owner, orders_0.cc_number, orders_0.cc_expires, orders_0.cc_type
FROM inuitart.address_book address_book_0, inuitart.countries countries_0, inuitart.customers customers_0, inuitart.customers_info customers_info_0, inuitart.orders orders_0
WHERE orders_0.customers_id = customers_0.customers_id AND customers_info_0.customers_info_id = customers_0.customers_id AND address_book_0.customers_id = customers_0.customers_id AND countries_0.countries_id = address_book_0.entry_country_id
ORDER BY customers_info_0.customers_info_date_account_created DESC
 
Last edited:

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Gary McMaster

Well-known Member
Joined
Feb 8, 2009
Messages
1,977
There's some good info on parameter querys in this thread:

http://www.mrexcel.com/forum/showthread.php?t=322540

Check out this page that is referenced in one of the replies:

http://www.dicks-clicks.com/excel/ExternalData6.htm#Parameters

About half way down the page there is a screen shot of the "Parameters" dialog box. It sounds like you need the radio button labeled "Get the value from the following cell:"

The process is also described in the "MSQuery" help file. If you search for "parameter" in that file it should get you there.

Gary
 

Watch MrExcel Video

Forum statistics

Threads
1,127,443
Messages
5,624,806
Members
416,055
Latest member
EJGAJG

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
Top