August 19, 2014 at 9:26 am
For my users, they would expect the same answer either way. One way to handle that would be that if the @Fromdate is greater than the @Todate, simply switch the two values and proceed with the code.
August 19, 2014 at 9:34 am
Lee Linares (8/19/2014)
For my users, they would expect the same answer either way. One way to handle that would be that if the @Fromdate is greater than the @Todate, simply switch the two values and proceed with the code.
Hahaha
right,thanks.i was thinking the same.
i will request to admin to modify changes.
Thanks once again.
Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature
August 27, 2014 at 3:19 am
Now it seems good.
Thank you admin.
Vimal LohaniSQL DBA | MCP (70-461,70-462)==============================The greatest barrier to success is the fear of failure ** Success is a journey not a destination**Think before you print, SAVE TREES, Protect Mother Nature
May 21, 2015 at 1:44 pm
Thanks for the new insight. There seems to be quite a number of these types of scripts, telling time between something.
March 29, 2016 at 5:33 am
When you post something like this please preface it with some text about why I should use this. If I don't know why then why should I bother to understand it.
March 29, 2016 at 5:58 am
dplaut 49149 (3/29/2016)
When you post something like this please preface it with some text about why I should use this. If I don't know why then why should I bother to understand it.
"Accurate Time between Two Dates in Year, Month, Day Format". What could be less ambiguous? Use this function when you require the interval between two dates in Year, Month, Day format.
Why should you bother? Because you don't yet know it all.
Having said that, without incorporating the modifications to the function which were recommended in the discussion from the first time this function was posted, the function will perform poorly. Why not read the discussion then attempt to make those recommended changes?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
March 29, 2016 at 6:12 am
The comment prefacing the code is "This is a function..." Yes, we can see that it is a function.
Why should I use your function vs. some other method that I/We have been using for years. You have to sell it to me before I am going to copy and paste unknown code and test.
March 29, 2016 at 6:24 am
dplaut 49149 (3/29/2016)
The comment prefacing the code is "This is a function..." Yes, we can see that it is a function.Why should I use your function vs. some other method that I/We have been using for years. You have to sell it to me before I am going to copy and paste unknown code and test.
Whilst there is some merit to the point you are making, ssc is after all a free resource. It's not unreasonable of the proprietors of this site to expect you to exert a modicum of effort in determining what may be useful to you and what may not.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
March 29, 2016 at 6:47 am
Here are some posts that serve as examples to demonstrate how at least a short description preceding code can be helpful.
http://www.sqlservercentral.com/scripts/Miscellaneous/31104/
http://www.sqlservercentral.com/scripts/Miscellaneous/31292/
http://www.sqlservercentral.com/scripts/T-SQL/31274/
http://www.sqlservercentral.com/scripts/Miscellaneous/31286/
March 29, 2016 at 6:58 am
dplaut 49149 (3/29/2016)
http://www.sqlservercentral.com/scripts/Miscellaneous/31104/
http://www.sqlservercentral.com/scripts/Miscellaneous/31292/
http://www.sqlservercentral.com/scripts/T-SQL/31274/
http://www.sqlservercentral.com/scripts/Miscellaneous/31286/%5B/quote%5D
These articles benefit from a short description, for sure. In the spirit of "joining the discussion" as opposed to criticising the author, exactly what information would you like to see added?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
March 29, 2016 at 7:07 am
Thanks for the script.
March 29, 2016 at 7:11 am
It was not so much intended as a criticism as a suggestion. I think this site and its contributors are enormously valuable. I also think a description of a suggested technique makes the site a better resource for the world wide community.
At a minimum:
- What this code does
- If it is something that we all commonly do, such as calculate time between two dates, then a description of what makes this code superior to other techniques would be valuable. i.e. "why should I use this."
Example:
DateDiff is somewhat self explanatory but a Microsoft employee took the time to write one sentence describing the function.
Viewing 12 posts - 16 through 26 (of 26 total)
You must be logged in to reply to this topic. Login to reply