Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parameters In External ODBC Data Queries - "is one of" | Excel Discussion (Misc queries) | |||
Excel web queries using parameters | Excel Discussion (Misc queries) | |||
Excel Queries with subqueries and parameters | Excel Discussion (Misc queries) | |||
parameters not allowed | Excel Discussion (Misc queries) | |||
Parameters are not allowed in queries that can't be displayed grap | Excel Discussion (Misc queries) |