home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!keele!news
- From: csa09@seq1.keele.ac.uk (Paul Singleton)
- Newsgroups: comp.databases.theory
- Subject: Re: date -> day of week conversion
- Message-ID: <Bz9B9C.BBD@gabriel.keele.ac.uk>
- Date: 14 Dec 92 16:03:11 GMT
- References: <dtb.724154401@otto>
- Sender: news@gabriel.keele.ac.uk (UseNet News Service)
- Organization: Keele University, England
- Lines: 25
- Nntp-Posting-Host: seq1.cc.keele.ac.uk
-
- From article <dtb.724154401@otto>, by dtb@otto (David Bath):
-
- > csa09@keele.ac.uk (Paul Singleton) writes:
- ...
- >>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;
-
- OK so I can define a function for use in a join condition, but I really
- want to define a virtual table, some of whose columns are functions of
- other columns. I can see that SQL syntax doesn't accommodate this concept,
- although I claim it is a reasonable thing to want to do.
- ----
- __ __ Paul Singleton (Mr) JANET: paul@uk.ac.keele.cs
- |__) (__ Computer Science Dept. other: paul@cs.keele.ac.uk
- | . __). Keele University, Newcastle, tel: +44 (0)782 621111 x7355
- Staffs ST5 5BG, ENGLAND fax: +44 (0)782 713082
-