July 7, 2016 at 4:07 pm
Sergiy (7/7/2016)
drew.allen (7/7/2016)
Sergiy (7/6/2016)
It's actually another way around - it's you who did not provide any rationale for using CAST rather than CONVERT in any cases.Actually, I did provide my rationale, but I'll repeat it for you. CAST is ANSI standard, CONVERT is T-SQL specific. I tend to use the ANSI standard in cases where the results are the same.
Drew
What is the rational reason for using ANSI standard commands?
I honestly don't see any.
In what way they are any better then non-ANSI standard ones?
If the two are otherwise indistinguishable, which is true in the vast majority of cases, why wouldn't I choose the one that is standard? It's better simply by the fact that it is standard. I use CONVERT when it's necessary, but I use CAST when it doesn't matter.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 7, 2016 at 4:44 pm
drew.allen (7/7/2016)
If the two are otherwise indistinguishable,
They are not.
I provided an example where CAST is not doing its job properly. and can add more.
which is true in the vast majority of cases,
If 2 teams were equal in the vast majority of time through the game, except for the 2 moments when one team failed to defend their goal, it's a loss. 2-0, final result. It's a loss.
And nobody cares about the vast majority of equalities.
why wouldn't I choose the one that is standard?
Because by the overall score - it's lost.
It's better simply by the fact that it is standard.
It's better if every woman wears a burca.
Simply by the fact that it is standard.
I use CONVERT when it's necessary, but I use CAST when it doesn't matter.
Drew
OK, in the end of the day you do not have a standard.
You code does not follow a standard.
You use different functions for the same purpose.
You code lacks consistency.
And you attempt to follow some standard defined by some foreign (for me, at least) institute does not help it at all.
I prefer to follow a standard.
If I have 2 functions available and 1 of them does the job every time, while another one fails in some cases, I choose the 1st one as a standard and eliminate another one completely.
Because the second one never wins. Not in a single case.
It does not really matter if it's a standard of my own. It's still a standard.
I don't see any rational reason why my standard is worse than ANSI.
But it's easy to see where it's better.
And you still have to use functions outside of the standard set, because that "standard" function lets you down in those "minor exception" cases.
As a result - you do not follow any standard, not ANSI, not of your own.
_____________
Code for TallyGenerator
July 7, 2016 at 5:47 pm
Sergiy (7/7/2016)
drew.allen (7/7/2016)
If the two are otherwise indistinguishable,They are not.
I provided an example where CAST is not doing its job properly. and can add more.
which is true in the vast majority of cases,
If 2 teams were equal in the vast majority of time through the game, except for the 2 moments when one team failed to defend their goal, it's a loss. 2-0, final result. It's a loss.
And nobody cares about the vast majority of equalities.
why wouldn't I choose the one that is standard?
Because by the overall score - it's lost.
It's better simply by the fact that it is standard.
It's better if every woman wears a burca.
Simply by the fact that it is standard.
I use CONVERT when it's necessary, but I use CAST when it doesn't matter.
Drew
OK, in the end of the day you do not have a standard.
You code does not follow a standard.
You use different functions for the same purpose.
You code lacks consistency.
And you attempt to follow some standard defined by some foreign (for me, at least) institute does not help it at all.
I prefer to follow a standard.
If I have 2 functions available and 1 of them does the job every time, while another one fails in some cases, I choose the 1st one as a standard and eliminate another one completely.
Because the second one never wins. Not in a single case.
It does not really matter if it's a standard of my own. It's still a standard.
I don't see any rational reason why my standard is worse than ANSI.
But it's easy to see where it's better.
And you still have to use functions outside of the standard set, because that "standard" function lets you down in those "minor exception" cases.
As a result - you do not follow any standard, not ANSI, not of your own.
You win the argument, but doesn't mean we may change the way we work. Now if I worked with you, which I don't, I would follow your standard as that would be required. But I think this argument has gone on long enough, and it is time to stop.
July 7, 2016 at 7:54 pm
Lynn Pettis (7/7/2016)
But I think this argument has gone on long enough, and it is time to stop.
Long enough - by which standard?
:hehe:
_____________
Code for TallyGenerator
July 8, 2016 at 9:40 am
Sergiy (7/7/2016)
Lynn Pettis (7/7/2016)
But I think this argument has gone on long enough, and it is time to stop.Long enough - by which standard?
:hehe:
By the standanrd that you keep bringing it up every ******* chance you can. You are just as bad as Mr. Celko. Do the two of you keep your white horses at the same stable? Heck, maybe you share the same white horse.
July 10, 2016 at 4:04 pm
Lynn Pettis (7/8/2016)
Sergiy (7/7/2016)
Lynn Pettis (7/7/2016)
But I think this argument has gone on long enough, and it is time to stop.Long enough - by which standard?
:hehe:
By the standanrd that you keep bringing it up every ******* chance you can. You are just as bad as Mr. Celko. Do the two of you keep your white horses at the same stable? Heck, maybe you share the same white horse.
Lynn,
I have no idea what is your deal with white horses, but I'm pretty sure they are not the source of all your troubles.
🙂
_____________
Code for TallyGenerator
July 11, 2016 at 8:14 am
Sergiy (7/10/2016)
Lynn Pettis (7/8/2016)
Sergiy (7/7/2016)
Lynn Pettis (7/7/2016)
But I think this argument has gone on long enough, and it is time to stop.Long enough - by which standard?
:hehe:
By the standanrd that you keep bringing it up every ******* chance you can. You are just as bad as Mr. Celko. Do the two of you keep your white horses at the same stable? Heck, maybe you share the same white horse.
Lynn,
I have no idea what is your deal with white horses, but I'm pretty sure they are not the source of all your troubles.
🙂
You wouldn't, but that's okay.
Viewing 7 posts - 31 through 36 (of 36 total)
You must be logged in to reply to this topic. Login to reply