Mark Aufflick said:
> do show disturbingly similar philosophies - like making NULL = NULL by
> default because many clients with poorly trained developers asked for
I recon that's the only one! (and I still don't see why this is such a bad
thing) My problem with MySQL isn't this "simplification", it's the
inconsistencies. (apart from other "known issues") Sybase is very
consistent in what it does, even if you find it's not the way _you_ would
like it to do things.

> things like trying to format a date (that's not one of the fixed and
> oddly numbered formats) can be quite trying in Sybase.
Absolutely right; it's stupid the default output isn't ANSI format. All
sybase projects I have been on in the past few years were Java, so I just
got a Date object back just like with any other database and formatting
wasn't an issue.

That said: I don't tend to use any formatting features of the database in
my web apps on AOLserver. (or Vignette, which also uses Tcl) Instead, I
take the default format and simply create a "date_format" Tcl procedure I
pass everything through. If needed, I first use a regexp (or split/lindex)
to put the date from the db into something "clock scan" can take in and
then format it using the clock format command.

I don't even see this as a workaround for the database's limitations; it
makes perfect sense to have one date format proc to be used throughout the
website as dates never have more than one or two formats on any given
site.

For Sybase I would simply select all dates as "convert(varchar(20),
date_col, 23)" to get back the "2005-12-23T15:33:32" format. "clock scan"
parses this fine if you just take out the "T". (it parses it with the "T"
too, but gets the time wrong and thinks it is 7 hours earlier for me!)

Sybase does also take the ANSI "2005-12-23 15:33:32" format as input, so
that is one less thing to worry about.

Another shortcomming of dates in Sybase is a complete lack of timezones.
If needed, I get around this by storing everything as UTC. Java's
PreparedStatement makes this quite easy - as long as you use jconn3 as
version 2 didn't due to a bug - you can use the "-gmt 1" switch in clock
scan/format for Tcl. But that does make using getdate() as defaults
impossible.

> I do find the T-SQL syntax quite cumbersome too, but I suspect that is
> more personal preference than anything else.
It could very well be what you grew up on; I used T-SQL before anything
else and just hate PL/SQL!

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to