Hello
Would someone please shed some light on what's wrong with calls like
IF( DATE(d) = some-date, TIME(d), d )
on DATETIME columns?
Thank you.
I run some tests on mysql 5.0, 5.1 and 5.5: got the same wierd results
everywhere, so I guess I'm missing something, but what is it?
It looks like
In the last episode (Aug 07), Marius Feraru said:
--
SELECT d, IF( DATE(d)=@rd, DATE_FORMAT(%T,d), d) wtf2 FROM dt
--
+-+-+
| d | wtf2|
+-+-+
|
On Sun, Aug 7, 2011 at 20:34, Dan Nelson dnel...@allantgroup.com wrote:
I think you need to swap your arguments to DATE_FORMAT
Of course, sorry about that stupid example, I was just trying to build
up from the original problem and failed. Thanks :)
The problem still stands though. Any ideas?
I despise this sort of notation, and have instead adopted what have
cheerfully named Hungarian Suffix notation, the reason being Signal-To-Noise
ratio. Instead of prefacing everything with some form of prefix, just do the
opposite:
Customer_tbl
Customer_Dead_boo
Customer_DOB_date
Customer_qs
I join you Arthur. That Hungarian notation is despicable (though I love
listening to that language, it is different).
I don't find it necessary for a column name to tell me its type.
But I do like the ability to have all database objects (table, column, trigger,
index, fk, views, procedures,