Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Parameter to Parameter Expand / Collapse
Author
Message
Posted Tuesday, July 22, 2008 5:06 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 17, 2014 11:09 PM
Points: 176, Visits: 481
Hi! I'm back

How do I pass the value of a parameter to another parameter.
Post #538324
Posted Tuesday, July 22, 2008 6:15 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 17, 2014 11:09 PM
Points: 176, Visits: 481
Ok. got that sorted by choosing non-queried for available values and setting the value to '=Parameters!EndPeriod.Value. However that makes my query extremly slow



Please help
Post #538382
Posted Tuesday, July 22, 2008 6:46 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 11:11 AM
Points: 384, Visits: 312
in your datasets say for eg

select * from this where this is in (@parametername)

if you want more help, i think you need to give more details.

Post #538418
Posted Tuesday, July 22, 2008 6:55 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, December 26, 2012 12:43 PM
Points: 1,330, Visits: 455
thatok (7/22/2008)
Ok. got that sorted by choosing non-queried for available values and setting the value to '=Parameters!EndPeriod.Value. However that makes my query extremly slow



Please help


thatok,

Its not clear about your source Table size.

It may be the reason that your filter condition is taking too much time.

If this is the case, you need to optimize your query by proper indexing.


Cheers,
Hari
Tips & Tricks for SQL BI Developers
Post #538423
Posted Tuesday, July 22, 2008 6:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 17, 2014 11:09 PM
Points: 176, Visits: 481
Here's the scenario:

Dataset1:
Select *
from MyTable
Where Period Between @StartPeriod AND @EndPeriod; --- Works like a charm

Dataset2:
Select *
from MyTable
Where Period = @Period;

@Period should get its values from @EndPeriod.

The idea is: Headcount report showing monthly staff headcount in a table and Year to Date growth in a graph. Dataset1 would populate the graph while dataset2 populates the table
Post #538426
Posted Tuesday, July 22, 2008 7:06 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 11:11 AM
Points: 384, Visits: 312
why can't you just put

Dataset2:
Select *
from MyTable
Where Period = @EndPeriod;


?
Post #538435
Posted Tuesday, July 22, 2008 7:13 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, July 17, 2014 11:09 PM
Points: 176, Visits: 481
Thank you very much. It works. And it's fast again
Post #538448
Posted Tuesday, July 22, 2008 7:16 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 11:11 AM
Points: 384, Visits: 312
good to hear!
Post #538449
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse