Viewing 15 posts - 1,231 through 1,245 (of 9,702 total)
drew.allen (1/4/2017)
CASE is clearly more flexible than COALESCE, because it can perform any conditional test whereas COALESCE only tests whether an expression is NULL, and because it can return any...
January 5, 2017 at 4:36 am
Alan.B (1/4/2017)
Sorry for the off-topic rant; just some food for thought.
Not at all off topic. You made some very good points. As did Luis about using the functions.
Thank you both...
January 5, 2017 at 4:29 am
Eric M Russell (1/4/2017)
If the user entered codes are not relationally tied to any other table, then what are the ramifications of them being entered "wrong" ?
As I said, these...
January 4, 2017 at 12:50 pm
Just to clarify. The data is coming from a vendor-created database. I cannot make changes to it. I can, however, send emails to the users saying "Fix this item, it...
January 4, 2017 at 11:26 am
Eric M Russell (1/4/2017)
January 4, 2017 at 11:21 am
Luis Cazares (1/4/2017)
IF (SELECT OBJECT_ID('tempdb..#MyTemp')) IS NOT NULL
DROP TABLE #MyTemp;
CREATE TABLE #MyTemp (QuestionableColumn CHAR(20));
INSERT INTO #MyTemp (QuestionableColumn)
VALUES ('ABC1GKUCEEF7AR169582'), --Good value
('ABC2G1WG5E37D1157775'), --Good value
('BCD3GTU2TEC9FG119962'), --Good...
January 4, 2017 at 11:20 am
Thom A (1/4/2017)
Brandie Tarvin (1/4/2017)
Thom A (1/4/2017)
January 4, 2017 at 11:17 am
drew.allen (1/4/2017)
Brandie Tarvin (1/4/2017)
I like CASE personally because it allows me to alter values being returned (or add new information) where as COALESCE just returns the original value.
But you can...
January 4, 2017 at 10:50 am
The main differences between CASE and COALESCE() are that COALESCE() is faster to type and CASE gives you other data manipulation options. Otherwise, they are mostly identical in the way...
January 4, 2017 at 8:51 am
Thom A (1/4/2017)
January 4, 2017 at 7:54 am
Or use a CASE statement.
SELECT Col1, Col2,
CASE WHEN cte1.Col IS NULL THEN cte2.Col ELSE cte1.Col END AS MyCol
FROM ....
This assumes that you can join the CTEs to each other...
January 4, 2017 at 7:43 am
Siiiiiigggggghhhhh.
You would think when I get an alert that a log file drive is full in a non-prod system the first thing I would look at is whether or not...
December 16, 2016 at 11:03 am
Eirikur Eiriksson (12/16/2016)
Phil Parkin (12/16/2016)
Grumpy DBA (12/16/2016)
December 16, 2016 at 6:49 am
Beware the Twitter list. For it is a way of defining you and boxing you into a corner!
Actually, lists can be followed as a whole (I don't remember how) so...
December 16, 2016 at 4:57 am
JustMarie (12/13/2016)
drew.allen (12/13/2016)
December 13, 2016 at 10:31 am
Viewing 15 posts - 1,231 through 1,245 (of 9,702 total)