Viewing 15 posts - 16 through 30 (of 129 total)
Thanks Jeffrey, I see and now understand where the close parenthesis was missing. that makes better sense.
I am calling the stored procedure from a C# Windows Application Menu item. I...
September 30, 2022 at 10:44 am
Hi Jeffrey! I have been battling with the
Declare @previous_date date = iif(day(getdate() > 16, dateadd(day, -1, getdate()), eomonth(getdate(), -1));
Command you suggested. It keeps erring out with...
September 29, 2022 at 12:31 pm
Great suggestions! Much appreciated.
September 23, 2022 at 5:05 pm
Thanks Jeffrey, that does help a lot. I will modify the alias piece, just have not gotten to it yet. Function before form... Yes sld.ControlPointName would be correct.
I really appreciate...
September 23, 2022 at 4:30 pm
Jeffrey, here is the complete script. This appears to be working;
Note I added an additional Declare for @prev_date. Then changed [End of Month] to [Yesterday] in the select statement.
Does that...
September 23, 2022 at 2:44 pm
Hi Jeffrey,
I think this is what I need to add/change
Declare @last_day datetime = DATEADD(day, -1, convert(date, GETDATE()))
Is this correct?
September 23, 2022 at 1:27 pm
Sorry Jeffrey, I was not very clear there.
What I am looking it is for example today is the 22nd and lets say the boss wants to go up to the...
September 22, 2022 at 11:56 pm
Jeffrey, one last afterthought question;
With regard to the current Month query; What if I wanted to go to @current_date -1?
I tried changing the @last_day to date = day(day(@current_date), -1) .
This...
September 22, 2022 at 3:50 pm
Jeffrey, thank you. that is very helpful and explained well.
Arron/Scott, Yours were very helpful and I appreciate all the explanation and recommendations. I learned a lot from this little query!
September 22, 2022 at 2:34 pm
First off, THANK YOU to all of you.
Jeffrey, one clarification question regarding Month/Day/year. The boss wants that info there. I am not following comment # 7 completely.
Also if I want...
September 22, 2022 at 12:25 pm
Scott, I think this is the answer. Please review and give me your opinion.
USE tmdsDatabaseStatistics
--DECLARE @day int
DECLARE @month int
DECLARE @year int
DECLARE @d DATETIME = getdate(), @day TINYINT...
September 21, 2022 at 3:27 pm
Scott, I modified the query and it looks like this (included to make sure we are both on the same page);
USE tmdsDatabaseStatistics
DECLARE @day int
DECLARE @month int
DECLARE @year...
September 21, 2022 at 3:10 pm
I will give a try when I get back to my desk.
thanks Scott
September 20, 2022 at 4:00 pm
How do I pass a variable to the CASE Statement for the First/Middle/End of Month.
doing a
DECLARE
@year int
@month int
@day int
SET @year = 2022
SET @month = 8
SET @day =...
September 20, 2022 at 10:57 am
Scott/Aaron, I think I have nailed the basic. Take a look at this one.
I still have to figure out how to replace the 1, 15, 31 for;
DECLARE @FirstDOM datetime, @NextFirstDOM...
September 19, 2022 at 2:47 pm
Viewing 15 posts - 16 through 30 (of 129 total)