Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pull data with entered date


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to pull the data for current date - Query Viol-8-r New Users to Excel 1 September 11th 09 01:49 AM
Date extraction from data pull M Thran Excel Discussion (Misc queries) 1 August 13th 09 04:37 PM
Enter date on one worksheet, pull data from another Shoney Excel Discussion (Misc queries) 2 November 9th 07 03:51 AM
Enter date, then pull data from another sheet Shoney Excel Discussion (Misc queries) 2 November 9th 07 03:40 AM
Pull latest date data - ignore the rest dallin Excel Worksheet Functions 4 February 9th 06 06:41 PM


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"