Viewing 15 posts - 2,521 through 2,535 (of 59,067 total)
Thanks for the reply, Eirikur.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 4, 2022 at 4:59 pm
I'd suggest adding a Continuous Integration step into your setup. Just deploy the code, without data, into a database, on commit of the code (or a push to a...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 4, 2022 at 4:41 pm
this works perfectly! Many thanks!!
It works perfectly for the given data. Try deleting one of the dates and find out that the date doesn't appear in the result. If...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 4, 2022 at 4:32 pm
To continue, one of my pet peeves are SQL lines of code that go off screen and dynamic SQL that comes out as a single line of code, especially when...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 7:18 pm
Just in case anyone else is having the issue... I've verified that I'm no longer getting email responses for posts that I've subscribed to or have responded to. I've send...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 6:43 pm
Another simplification would be to use DATENAME for the year instead of casting the results of the YEAR(() function.
EDIT: Sorry... I missed the -1 that was being done.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 6:11 pm
Post withdrawn.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 6:03 pm
You also list the 3 conditions, as follows...
If duplicate codes then invalid result
if 8 & another code then invalid result
if 9 & another code then invalid result
For the first rule,...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 5:57 pm
[Options table] 1 Option1 2 Option2 8 None 9 NotKnown
[Answers table] Student Answer 100 1 100 2
101 1 101 9
Student 100 answers are valid. Student 101 answers are not...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 5:54 pm
... but my main concern is that i want the validation in my editor, rather than during deployment.
I'd be a bit concerned about that process... it sounds like...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 5:26 pm
p.s. If you want to add a week number just add the following to the SELECT list...
,Wk = t.N+1
And thanks for the test data and the examples of the expected...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 3:50 am
For some reason (mostly avoiding lots of "Logical READS"), I take great relish in avoiding Calendar tables, especially for things like this.
Here's the code I used...
--===== Solve...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2022 at 3:33 am
Reminder... String_Split does not have an ordinal position of elements in the return in 2019. You'll need to use DelimitedSplit8K or something similar.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2022 at 11:12 pm
I don't know for sure but, my guess would be, probably because the one person writing the QOD's has more than one job. It's not easy to come up with...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2022 at 11:07 pm
SQLAgent is a scheduling/control program... not a data transfer program. What is SQLAgent calling to do the transfer. That's what you need to look at.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2022 at 10:52 pm
Viewing 15 posts - 2,521 through 2,535 (of 59,067 total)