MySQL - retrive data using microsoft query in excel

Asked By Cherifa Hima on 19-May-12 11:39 PM
Hi,
I am using microsoft query in excel. I am filtering the date of the database based on the content of two cells in excel ( See attached file below). However, the query is not returning any data. If I specify the date like 05/05/2012 or any other date it work ( the fomrat of the date in the database is 2010-05-05). But if I select the date based on the two cells in excel it does not return anything.
Microsoft query is this:
SELECT v_ccdata_0.bookingdate, v_ccdata_0.bookingnumber, v_ccdata_0.agentname, v_ccdata_0.pax_1_name
FROM cheapc.v_ccdata v_ccdata_0
WHERE (v_ccdata_0.bookingdate Between ? And ?)

New Compressed (zipped) Folder (2).zip

Thanks.
Somesh Yadav replied to Cherifa Hima on 21-May-12 12:27 AM
try this,

http://office.microsoft.com/en-us/excel-help/use-microsoft-query-to-retrieve-external-data-HA010099664.aspx
http://office.microsoft.com/en-us/excel-help/about-using-microsoft-query-to-retrieve-external-data-HP005274751.aspx
http://social.technet.microsoft.com/Forums/en-US/excel/thread/3e330ebc-ca90-4cd3-ba2d-3e1b41bd3262
LIJO PHILIP replied to Cherifa Hima on 21-May-12 12:33 AM
Using Microsoft Query, you need to join these tables so that the date based on two table will be retrieved.
Cherifa Hima replied to LIJO PHILIP on 21-May-12 09:33 AM
Thanks. But I don't have two tables. I have columns within one table. And it seems the format of the date in the database and in the cell in excel sheet are different that's why the query is not returning anything.
Cherifa Hima replied to Somesh Yadav on 21-May-12 09:33 AM
Did not help.
[)ia6l0 iii replied to Cherifa Hima on 28-May-12 09:19 PM
Please post this Q in Excel forum