Viewing 15 posts - 1 through 15 (of 210 total)
Scott,
How do I add the tablename to this query? So it displays the tablename with the result of the max().
April 5, 2024 at 4:31 pm
I'm also getting a'Concat_ws' is not a recognized built-in function name.
April 5, 2024 at 2:32 pm
String_AGG will not work for me. I just realized, I'm working on SQL 2016.
April 5, 2024 at 2:27 pm
I think I will also need to add the table name to the result of the query.
April 5, 2024 at 2:05 pm
Jeff, thanks for taking the time for that educated explanation. I learned a lot from it. I had to look up "corpuscles", for a moment I thought it was a...
September 29, 2023 at 2:28 pm
I would define first week as any days of the month that land on the first week of the month. i.e. if September 1 lands on Friday, then September...
September 29, 2023 at 2:15 pm
I would define first week as any days of the month that land on the first week of the month. i.e. if September 1 lands on Friday, then September 1...
September 28, 2023 at 1:12 pm
Jeff, We have an existing table that houses this information for other years. I was tasked with adding the dates for year 2021 to this existing table, but I didn't...
October 27, 2022 at 8:09 pm
Yes, I have the fnTally function. When I run your code the way it is, it errors "Invalid column name 'Number'
Sorry. His version uses "N". I modified my version...
October 27, 2022 at 7:05 pm
Do you have Jeff's fnTally function and did you test it? It is a TVF that in this case returns numbers 1-52...
after I fixed the script to return Number +...
October 27, 2022 at 5:37 pm
Jeff, yes it will always start on Wednesday. So the week is from Wednesday thru Tuesday.
October 27, 2022 at 5:31 pm
Something like this using a tally table or function:
DECLARE @startDate date = '2021-01-06'
DECLARE @nextYear date = DATEADD(year,1,DATEADD(year,DATEDIFF(year,0,@startDate),0));
SELECT DATEADD(WEEK,Number,@startDate ) AS StartDate, DATEADD(DAY,6,DATEADD(WEEK,Number,@startDate )) AS EndDate, Number...
October 27, 2022 at 5:09 pm
Try using the LocDocAmt only...that's the only column that matters. Also, LocDocAmt has negative amounts. The other amount columns will throw off the results in different examples.
Actually, I think...
October 10, 2022 at 4:22 pm
Viewing 15 posts - 1 through 15 (of 210 total)