Viewing 15 posts - 2,341 through 2,355 (of 7,614 total)
It has no dependencies because it sorts the values again (as I understood the q). If you have a lot of data that has already been sorted, that...
August 10, 2020 at 2:10 pm
IIF is a corruption of SQL syntax to make other developers feel more comfortable.
A terrible idea, in my opinion. Oracle's done the same thing to PL/SQL (Oracle equivalent of T-SQL),...
August 10, 2020 at 2:06 pm
Gotta admit, I'm not a fan of PIVOT nor UNPIVOT. I just don't care for the syntax / approach. It seems counter-intuitive to me, naturally YMMV.
August 7, 2020 at 8:18 pm
It has no dependencies because it sorts the values again (as I understood the q). If you have a lot of data that has already been sorted, that may not...
August 7, 2020 at 2:47 pm
Here's code that relies on the sequential ordering of the ID column of the underlying data set. You could generate ID using a SEQUENCE if nothing else to insure it...
August 6, 2020 at 7:04 pm
I'm not aware of anything that does that, and certainly not well.
For a SQL instance managed by Azure, there is some index tuning automatically done, but it's pretty limited.
You can...
August 6, 2020 at 3:58 am
It's both reasons that it's faster. To pretend that the shared locks on rows don't take any time is just not true. It may be small overhead, but...
August 5, 2020 at 9:16 pm
Great, glad it helped.
Btw, note that you must ALWAYS use the alias in the UPDATE statement when using a join in an UPDATE.
--WRONG!!
UPDATE Brs --<<--WRONG!! MUST be (alias) B
SET HrsHKB...
August 5, 2020 at 5:03 pm
Thanks all.
Yeah, normally I too try to avoid loops, but in this case, it's probably better just to loop.
For absolute max efficiency, you can uncomment the UPDATE #bundles statement, although...
August 5, 2020 at 4:53 pm
Yes, it works, it's easy enough to write code to prove it:
;with tbltest as (select cast('ab012' as varchar(5)) as TestNumber) select * from tblTest where TestNumber = cast(20012 as varchar(5))
Just...
August 5, 2020 at 4:50 pm
August 4, 2020 at 6:03 pm
Thus, the only real issue is dirty reads. So, again, if dirty reads would cause you a problem, DON'T use NOLOCK. If not, you can consider it.
But...
The biggest...
August 4, 2020 at 5:05 pm
August 4, 2020 at 4:55 pm
NOLOCK is NOT a bad thing when used properly, i.e., dirty reads are acceptable for that query (or you know that dirty reads aren't going to recur). There has been...
August 4, 2020 at 4:43 pm
Viewing 15 posts - 2,341 through 2,355 (of 7,614 total)