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:

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,731
Members
448,987
Latest member
marion_davis

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