Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ruz Ruz is offline
external usenet poster
 
Posts: 1
Default parameters not allowed in queries that can't be displayed graphica

Hi,

I'm trying to run a sproc that was created on SQL server and has two date
parameters. I can run the sproc easily enough with fixed values but it
doesn't work with parameters as the sproc can't be displayed graphically?!?!

I have seen that the suggested solution is to create a view but as this
query uses group by, using the where clause in a view to specify the
parameteres will not give the correct result set.

This is part of the SQL from the sproc......

SELECT SG.SchemeName as SchemeName,
'Fail' as Type,
COUNT(CASE WHEN Q.Createdby = 'WEBUSER' THEN 1 END) as Web,
COALESCE(SUM(CASE WHEN Q.Createdby = 'WEBUSER') THEN Q.GrossPremium END),0)
as Value
FROM Quote Q
INNER JOIN SchemeGroup SG
ON Q.SchemeGroupID = SG.ID
INNER JOIN SubScheme SS
ON Q.ID = SS.QuoteID
WHERE lql.dbo.isPolicy(Q.ID) = 0
AND Q.CreatedAt BETWEEN @SDATE AND @FDATE
GROUP BY SG.SchemeName
ORDER BY SG.SchemeName,Type desc

Any help or ideas would be appreciated.

Thanks,

Ruz
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
Parameters In External ODBC Data Queries - "is one of" Michael R Excel Discussion (Misc queries) 0 October 2nd 07 10:52 AM
Excel web queries using parameters Rob Cherry Excel Discussion (Misc queries) 6 March 19th 07 01:33 AM
Excel Queries with subqueries and parameters theday_99@yahoo Excel Discussion (Misc queries) 0 September 28th 05 01:24 PM
parameters not allowed begrry Excel Discussion (Misc queries) 0 May 3rd 05 03:56 PM
Parameters are not allowed in queries that can't be displayed grap Flora Tzeng Excel Discussion (Misc queries) 1 March 15th 05 10:34 AM


All times are GMT +1. The time now is 08:42 AM.

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

About Us

"It's about Microsoft Excel"