June 21, 2017 at 2:03 pm
for starters, how can i just pass hardcoded value to the variable. I need, at the very least, for testing purposes, to pass this date to my query to see if the passing of parameters works.
Can you show me how to configure variable: named @FromDate so it is passing either hardcoded value or an expression that will update dynamically based on today's date?
--Quote me
June 21, 2017 at 3:11 pm
polkadot - Wednesday, June 21, 2017 2:03 PMfor starters, how can i just pass hardcoded value to the variable. I need, at the very least, for testing purposes, to pass this date to my query to see if the passing of parameters works.Can you show me how to configure variable: named @FromDate so it is passing either hardcoded value or an expression that will update dynamically based on today's date?
Pretty vague question here. I think you want something like this.
DECLARE @FromDate DATETIME = CONVERT(DATE, GETDATE())
SELECT @FromDate
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
June 21, 2017 at 3:26 pm
I need to pass params in integration Services as Variables to to Exec SQL Task query where I have already set and declared parameters.
I need SSIS expression to return this format dynamically : 2017-04-01 00:00:00.000
For troubleshooting, I need at least to equate an ssis variable to value 2017-04-01 00:00:00.000
--Quote me
June 26, 2017 at 2:37 pm
Looks to be a double post >
https://www.sqlservercentral.com/Forums/1882132/Expression-needed-for-Midnight-of-previous-day?PageIndex=1
----------------------------------------------------
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply