« first day (4197 days earlier)      last day (654 days later) » 

12:07 AM
Yep
 
your enthusiasm is noted
 
12:47 AM
> vaguely exciting
 
that's my superhuman humbleness paul
 
 
10 hours later…
10:35 AM
> superhuman humbleness
morning
 
Morning
 
 
4 hours later…
3:04 PM
it continues to bother me that computed columns can't be expressed as alias = expression and only as alias as expression
 
I'm more of an AS man myself
Seems more consistent
CAST AS
Computed column AS
Table, column alias AS
 
makes column name alignment ugly
 
I have moved to prefix where possible
And even for INSERT SELECT where the column names in the select don't matter, I am tending to name them in front as well.
 
3:19 PM
it's the safer way to go
i struggle with formatting for large column lists though
column per line gets a bit arduous
 
Leading comma, too.
It would be nice if SQL Server would do allow referring to prior derived columns in same list. That was convenient in Teradata. You could say SELECT X = a, Y = b, Z = X + Y.
 
@CadeRoux jdlr
 
@CadeRoux that's against the standard, so unlikely to be implemented now
 
one thing i really liked about oracle was select list expressions that didn't have an alias would have a column header that showed the expression rather than no column name like ssms
 
3:35 PM
@Zikato For consistency, do you also use CONVERT when necessary, and CAST when you can get away with it?
@ErikDarling Yeah that's dumb
Not as dumb as putting punctuation at the start, but still dumb;
@Zikato Have you also noticed modern execution plans report UDF elapsed time and UDF CPU?
Not logical reads though, but who cares about those
 
Oh, I very much hate the look of leading commas
But the time it saves is just huge. I'm never tracking down a missing comma, easier insert using column insert instead of the extra keystrokes to get switch column select to multi-column end of line insert instead of column selecting, etc.
I was probably majority of my development in SQL for 10 years before I switched to it. Was very much against it and skeptical. Now I use it in every language where possible
So after 10 years of C/C++/VB/C#, then 10 more years of SQL, only then - that's a long time I do kind of regret not trying it earlier.
 
I honestly never struggle with commas last.
Even if I did, it would be worth it so my code doesn't look like it was written by an intern
 
Lol
 
😀
 
SQLSL
 
3:48 PM
I do a lot of maintenance and refactoring, so a lot of list changes
 
No one ever considers how much of my time is wasted having to reformat errant code before I can bear to work on it
Thank goodness for code formatting tools
 
code formatting tools are just the beginning
 
They are, but they usually help rather than hinder overall
 
@PaulWhite was my qs/psp video technically correct©?
 
@ErikDarling I bookmarked (remembered where I saw it) to watch later. The cricket was on
For anyone wondering
 
3:59 PM
@PaulWhite no match for cricket
 
well quite
 
4:16 PM
😤
 
and it was raining
 
4:40 PM
All the more reason to spend time with my sunny countenance
 
 
3 hours later…
7:14 PM
@PaulWhite I do. I can't recall the last time I had to use CONVERT
@PaulWhite Sadly, I didn't notice. That's a big oversight on my part. I was wondering where Plan Explorer gets that info.
@PaulWhite Two very distinct plans made me lol.
 

« first day (4197 days earlier)      last day (654 days later) »