Viewing 15 posts - 3,766 through 3,780 (of 59,067 total)
In a CTE you could select the date difference between the CreatedDate and the LEAD(CreatedDated, 1, default) where the default is the current month (+1 to deal with boundary...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 16, 2022 at 4:08 pm
A large part of the reason why I've worked as an FTE for the same company for more than a decade is because I knew the person in charge of...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 16, 2022 at 3:01 pm
p.s. Nice content on the ZIP file. The Actual Execution plan shows the result of the NON-SARGable query perfectly... a HASH MATCH to join a 5 million row table with...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 16, 2022 at 2:41 pm
Heh... lordy. Here's the rowcount you posted for the query in question...
(10343197 row(s) affected)
And here's the WHERE clause from the code you posted...
WHERE C_MT_B_COMM_TO_PTY.PARTY_TYP_CD +...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 16, 2022 at 2:35 pm
BWAAA-HAAAA-HAAA!!! You chose the "handle" of "sqlguru"... shouldn't you be telling us how to do this? 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
March 15, 2022 at 6:11 pm
--Jeff Moden
Change is inevitable... Change for the better is not.
March 15, 2022 at 6:05 pm
Could be a multi-checkbox type question.
That's what I was thinking, as well.
I also hate such "company tests". They're either written by people at the company that may not know...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 15, 2022 at 4:16 pm
It is a DBA test, so there are themes I do not know deeply.
Spam? what?
Not to worry... we see a whole lot of new "users" of the site that...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 15, 2022 at 3:56 pm
I am newish to SQl. Is there a difference in using an alias using the AS keyword as opposed to what you have done here for the Prev_end and ...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 14, 2022 at 6:30 pm
I want to try a relational db for a small project, but I'm looking for something free. That can be a free cloud service or a free hosting service....
--Jeff Moden
Change is inevitable... Change for the better is not.
March 12, 2022 at 12:44 am
Hmm, I think it's a waste to use nvarchar for a basic value like Product ID. Twice the bytes for no gain. Why not just varchar?!
Microsoft Excel,...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2022 at 4:56 pm
While the book is (judging from the comments on the Amazon link) about 6 years old, there are some things about SQL that don't change much over time and the...
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2022 at 3:05 pm
Heh... Nope. It's almost 13 years old and I wasn't the one that necro'd it. 😀 I congratulated the person that posted yesterday and asked a simple question.
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2022 at 1:45 pm
I've found it to be much more fun and useful to pork chop anyone that sends me data in XML format. 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2022 at 6:05 am
Do you teach people how to count in the book?
--Jeff Moden
Change is inevitable... Change for the better is not.
March 11, 2022 at 6:00 am
Viewing 15 posts - 3,766 through 3,780 (of 59,067 total)