LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 593
Default Left JOINS in multiple table MSQuery in Excel

"dutty" wrote ...

I tried editing the sql to reflect this, and I receive the error:
"Parameters are not allowed in queries that can't be displayed graphically."


What has a LEFT JOIN got to do with parameters?!

Is there any other way to view a selected date range in this type of setup?


Yes. In the database, create a procedure which accepts parameters and
call the procedure from MS Query e.g. (a simpler query):

CREATE PROCEDURE
MyStoredProc (
start_date DATETIME,
end_date DATETIME
)
AS
SELECT
RefID,
DateEffective,
Earnings
FROM
EarningsHistory
WHERE
DateEffective
BETWEEN start_date AND end_date;

This can be called from MS Query using e.g.

EXEC MyStoredProc '01 JUL 2004', '31 JUL 2004'

Subject to permissions, you may even get away with running the CREATE
PROCEDURE from within MS Query!

Jamie.

--
 
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
Excel query via ODBC, left joins on multiple tables Todd Excel Discussion (Misc queries) 0 February 26th 09 05:42 PM
Multiple Excel/MSQuery install CLR Excel Discussion (Misc queries) 0 February 20th 07 01:25 PM
Pivot table change leaves MSQuery open Ian Digby[_2_] Excel Programming 0 June 18th 04 09:53 AM
Multiple joins in an Excel Query Karen S Excel Programming 5 November 7th 03 11:21 PM
SQL Multiple table joins in VBA James[_13_] Excel Programming 2 October 28th 03 03:02 PM


All times are GMT +1. The time now is 10:02 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"