Viewing 15 posts - 406 through 420 (of 1,413 total)
Not to could/would come up with it to begin with. Refactored to remove the CTE's. The test returns no rows
DROP FUNCTION IF EXISTS dbo.CalendarByDateFirstRefactored;
go
CREATE FUNCTION dbo.CalendarByDateFirstRefactored
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 18, 2022 at 11:53 am
Any suggestions or thoughts.
The function seems to generate the correct calendar. Nicely done Jeff 🙂
select * from dbo.CalendarByDateFirst('20211201', '20220131', 7);Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 17, 2022 at 1:11 pm
When I paste the OP's latest code into VS and run it it generates an incorrect calendar table. My interpretation of the OP's unresponsiveness amounts to "just make my kludge...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 16, 2022 at 7:52 pm
The tricky part of normalization is populating the tables imo. A lot of times it's an attempt to establish foreign key referential integrity post priori (after the fact). You could...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 14, 2022 at 2:58 pm
I'm still thrown off by week 53. What? How does this work? This topic is the same as this other one I'm assuming
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 14, 2022 at 2:09 pm
These are ISO weeks? If so filling in gaps using a tally function is probably not a good approach imo. Needs a calendar table
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 13, 2022 at 10:46 am
In the original question above the WeekNo column is CHAR(3). In your response to Phil I did not read past the word "Yes" (which is the 1st word) because it...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 12, 2022 at 10:28 am
Suppose your 'WeekNo' column contains a 'W' and maybe/(maybe not) a '-' and the leading 0's and spaces are all over the place. The key calculation is the numeric wk_num...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 11, 2022 at 10:26 pm
In which table is TechnologyId primary key? Is there a linear dependency between PartId and TechnologyId? Typically in general, if it's necessary to count (or rank) rows in order to...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 11, 2022 at 12:37 pm
Back in the 200#'s I had my own home server with 2008R2 installed. It was a Dell box and I bought different disk drives, memory, and cards to experiment with...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 10, 2022 at 1:37 pm
One graceful solution could be for the vendor to address the issue they caused. Another graceful way could be to rewrite the application so the DB Engine manages locks and...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 10, 2022 at 10:55 am
Ok I updated the query so the ORDER BY is using the numeric 'wk_num' column instead of 'WeekNo' which is CHAR(3) and other slight changes too
with lead_cte...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 9, 2022 at 5:25 pm
You could fill in the missing weeks by using the LEAD(WeekNo) function to determine start/end points of the ranges. To expand rows across the ranges you could use the...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 9, 2022 at 3:51 pm
Yes it's just an encoding. How could one perform such an encoding without XML? That's the hijacked topic 🙂 As an aside: I associated the encoding with a conversion because...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 7, 2022 at 11:44 am
Something similar iiirc. As I recall HASHBYTES were applied too. It was to make offers which expired
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
June 6, 2022 at 11:28 pm
Viewing 15 posts - 406 through 420 (of 1,413 total)