Re: Interval data types and SQL Server

From: Brian Scandale <Brrrian(at)Excite(dot)com>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>, <pgsql-novice(at)postgresql(dot)org>, <cf-talk(at)houseoffusion(dot)com>
Subject: Re: Interval data types and SQL Server
Date: 2002-04-17 20:30:43
Message-ID: 5.1.0.14.2.20020417123244.02e75380@mail.attbi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hey Josh,

Thanks for the insight.

My task is to get the application... Coldfusion.... to work with both postgres and sql server 2000 with the same coldfusion code... this makes maintenance and ongoing development of the app easier because any changes can be exported to all the various sites running it... regardless of the backend database.

The deal is that the database... 30 or so tables... holds maybe 30 or so records across all the tables upon initialization... Not a big deal.

I have not used any postges functions except the obvious ones like MAX etc... that should work across most any backend... (sqlserver, postgres, oracle, mySQL).

So my task is to decide how to store the interval... in a ??? char ??? field perhaps ??? and then process that with coldfusion for presentation... I know I've got a bit of work(understatement) ahead of me.

Sooo.... any and all hints give me ideas and clues to feed the monster ;)

Thanks!
Brian

At 09:42 PM 4/16/02 -0700, you wrote:
>Brian,
>
>> I have built an application using interval data type to hold things
>> like the time between two events etc.... (as you might expect)
>>
>> I am now required to deploy that app on SQL server too... and I just
>> discovered they have no interval data type... or at least it looks
>> that way to me... (no sql server gurus available where I am).
>
>Well, I am a SQL Server guru (or at least I can get people to pay me
>unreasonable amounts of money on that presumption), so I'll tell you
>flat out: If your application has to handle scheduling, you're in
>*big* trouble with MS SQL Server.
>
>MS SQL Server does not support Interval, does not support date math,
>and even its date/time data types are text-based and prone to errors.
> There are no easy workarounds ... it's like trying to code a
>text-parsing application in Visual Basic; you can do it, you'll just
>wish you'd learned Perl instead.
>
>Basically, tell your boss that if you are doing a scheduling-heavy app
>and it has to be ported to MS SQL Server, double your budget.
>
>If the scheduling/interval parts are a minority of the application,
>then maybe we can do something. Is this SQL Server 2000 or SQL Server
>7?
>
>> Not sure how I am going to handle this yet... So I am looking for any
>> sort of sage advise that you all might have for me at this point.
>
>I could port it for you, but I'd have to charge you a small fortune.
> Does your employer have one to spend? And you will have to re-do the
>porting process, manually, every time you update the application.
>
>If not, at least take a look at the porting advice at
>http://techdocs.postgresql.org/
>
>-Josh Berkus
>
>P.S. SQL Server does do *some* things well. Just not very many.
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>http://www.postgresql.org/users-lounge/docs/faq.html

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-04-17 20:51:57 Re: Interval data types and SQL Server
Previous Message Andrew McMillan 2002-04-17 19:57:55 Re: Coalesce with Timestamp,Nulls,and Concatenation