home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!munnari.oz.au!titan!trlluna!bruce.cs.monash.edu.au!monu6!escargot!otto!dtb
- From: dtb@otto (David Bath)
- Newsgroups: comp.databases.theory
- Subject: Re: date -> day of week conversion
- Date: 12 Dec 92 10:00:01 GMT
- Organization: RMIT Computer Centre
- Lines: 25
- Message-ID: <dtb.724154401@otto>
- References: <Byqssz.Bu5@gabriel.keele.ac.uk>
- NNTP-Posting-Host: otto.bf.rmit.oz.au
-
- csa09@keele.ac.uk (Paul Singleton) writes:
-
- >Can anyone produce SQL code to convert a date from DD/MM/YY (or MM/DD/YY)
- >format into the corresponding day of the week? I assume that you can
- >get at the individual DD, MM and YY fields (as integers?).
-
- >Am I right in thinking that this is *not* the sort of functionality which
- >SQL was designed to express, and that in general it is not feasible to
- >define a relation by algorithm (in the way that Prolog programmers are so
- >accustomed to doing)?
-
- Rumor has it that one SQL based DB, Empress, running on UNIX and VMS,
- permits you to define your own functions that can be embedded in the
- sql, letting you define that function and then
- select surname, givname
- where day_of_week(birthdate) = 'Saturday'
- from emp;
-
- David T. Bath Email:dtb@otto.bf.rmit.oz.au Phone:03-3477511
- Global Technology Corporation, 179 Grattan St, CARLTON, VIC, 3153, AUSTRALIA
- "Failure to emulate is the best revenge" - Marcus Aurelius
- --
- David T. Bath Email:dtb@otto.bf.rmit.oz.au Phone:03-3477511
- Global Technology Corporation, 179 Grattan St, CARLTON, VIC, 3153, AUSTRALIA
- "Failure to emulate is the best revenge" - Marcus Aurelius
-