@nerdydeeds said:
@pasqldba said:Do you really think the asterisk will that much harder to track down than the truncated version that Postgres keeps? Either way you don't get what you are expecting. The point that I am trying to make about fanboys is the frequent refrain of "check the documentation". In my mind that is simply what we are dealing with here. If a SQL Server user points out on the Oracle board here or many internet message boards something they find bizarre they are told to check the documentation, it is explained there. That is what I am saying in this case. Your expectation is one thing, you find the * bizarre. My point is that this behavior is documented in BOL in at least three versions of SQL Server - 2000, 2005 & 2008. Yes I checked all three, under the topic Cast and Convert. The Oracle Fanboy is quick to point out that what one expects is irrelevant if the behavior is documented. This behavior is documented. It would be bizarre if it is documented the way it is but performed like Postgres or Oracle.
Having loaded 60 million+ rows in a single batch, yes: having something to go on is very helpful. Documented or not, it's a WTF (and not even consistent at that). But seriously, who actually said "check the documentation" for this? Someone posted the documentation, nobody berated the OP. If it were something simple or just odd, I could understand someone shouting RTFM, but this is a real-life WTF that will apparently never be patched.
It was never my intention to berate the OP. I'm attempting to point out a double standard. People have posted lots of weird Oracle behavior on the I Hate Oracle Club forum. One of the frequently encountered replies on that forum is that the weird behavior is documented by Oracle, and it is implied that the weird behavior in Oracle ok because it is documented. However, when someone points out a weird SQL Server behavior and someone else can point that this behavior is documented, then you see replies along the line of yours. "This is a real-life WTF that will apparently never be patched."
To get back to your data load example, which non-Oracle way of handling this issue do you think would be found sooner? Neither Postgres nor SQL Server report an error. Personally I think the Postgres way of handling this issue could go unnoticed much longer because you are at least seeing numbers in the character column. Seeing the asterisk in SQL Server would cause one to immediately investigate WTF happened. A little research in BOL points out that you are trying to stuff more data in the column than it can hold. You can then make the necessary adjustments to fix the problem. Even though I am not a fan of Oracle I think they are the only dbms to correctly handle this situation by providing an error.