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 Date Expand / Collapse
Author
Message
Posted Wednesday, July 3, 2013 11:19 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 4:32 AM
Points: 40, Visits: 154
Hello,
I create the parameter date to the day of Mother's Day mother never trough the same day, is always on the second Sunday of May?
is possibel to create this parameter?
Post #1470173
Posted Thursday, July 4, 2013 12:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:00 AM
Points: 13,520, Visits: 11,313
You can write a SQL query that calculates this value and use this query to populate a default value for the parameter.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470323
Posted Thursday, July 4, 2013 2:33 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 4:32 AM
Points: 40, Visits: 154
how do the SQL query to calculate this value?
Post #1470341
Posted Thursday, July 4, 2013 3:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:00 AM
Points: 13,520, Visits: 11,313
You probably need a date table for this, which for example stores all the dates between 2000 and 2050.
An example on how to generate such a table can be found here:

Script to Populate Date Dimension, without Using a Cursor




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470360
Posted Thursday, July 4, 2013 10:33 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 4:32 AM
Points: 40, Visits: 154
I managed to build the SQL, it was through a SP
Only now I have a problem, I can not update the date
I will explain
I have a parameter with years. default is 2012
and the parameter of dates fetches the year.


Then when I change the year, the dates of the parameter does not update!
How do I solve this problem?
Post #1470478
Posted Thursday, July 4, 2013 10:39 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:00 AM
Points: 13,520, Visits: 11,313
amadeu_j (7/4/2013)
I managed to build the SQL, it was through a SP
Only now I have a problem, I can not update the date
I will explain
I have a parameter with years. default is 2012
and the parameter of dates fetches the year.


Then when I change the year, the dates of the parameter does not update!
How do I solve this problem?


Did you make the parameters cascading?




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470481
Posted Thursday, July 4, 2013 10:55 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 4:32 AM
Points: 40, Visits: 154
No
Post #1470483
Posted Thursday, July 4, 2013 11:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, July 31, 2014 4:32 AM
Points: 40, Visits: 154
So I can not put any parameter by default?
Post #1470491
Posted Thursday, July 4, 2013 1:14 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:00 AM
Points: 13,520, Visits: 11,313
amadeu_j (7/4/2013)
So I can not put any parameter by default?


You can put a default on a parameter. You just need to make the dataset that calculates motherday dependend on the first parameter.
This thread goes deeper into the problem of cascading parameters not refreshing:

http://social.technet.microsoft.com/Forums/sqlserver/en-US/40397ac3-c17e-49f7-821f-41b4ee0b39cb/ssrs-2008-r2-cascading-parameters-not-refreshed-on-changing-parent-parameter-values




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1470500
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse