Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I was grappling with this problem for quite a while and have (finally) come up with a solution so hopefully this will help you. The problem (I believe) is that the database is Oracle, whose internal date format is (usually) 'DD-MON-YY'. No matter how I tried to pass the date through a parameter box in MS Query it failed with an Oracle error code. I have not found a way round this using MS Query but I have found a way round it if you build the query in VBA. I just started recording a macro and opened a query in MS Query and then passed it back to Excel. When you examine the Macro code you can see where you need to edit the SQL. Add the parameter value as a "?" (as suggested in this thread I think). Then when you try and run the Macro Excel will prompt you for the value. It should work if you enter a valid Oracle format date, e.g. 01-OCT-05. I've linked this to a cell where the format is "text" so that it doesn't try and convert it to an Excel date. HTH. -- scos00 ------------------------------------------------------------------------ scos00's Profile: http://www.excelforum.com/member.php...o&userid=28264 View this thread: http://www.excelforum.com/showthread...hreadid=479472 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to pull the data for current date - Query | New Users to Excel | |||
Date extraction from data pull | Excel Discussion (Misc queries) | |||
Enter date on one worksheet, pull data from another | Excel Discussion (Misc queries) | |||
Enter date, then pull data from another sheet | Excel Discussion (Misc queries) | |||
Pull latest date data - ignore the rest | Excel Worksheet Functions |