home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!meaddata!jimj
- From: jimj@meaddata.com (Jim Johnstone)
- Newsgroups: comp.databases.sybase
- Subject: Questions sbout time based queries
- Date: 8 Jan 1993 21:54:22 GMT
- Organization: Mead Data Central, Dayton OH
- Lines: 27
- Distribution: na
- Message-ID: <1ikt6eINNh61@meaddata.meaddata.com>
- Reply-To: jimj@meaddata.com
- NNTP-Posting-Host: moose.meaddata.com
-
-
-
- We have a need to query out all rows entered by a given user since a specified
- time. My first thought was to use timestamp columns in all tables. So (I am
- very new to Sybase, so please be nice) my questions are:
-
- 1. Are timestamps the best way to go?
- (nice because they are automatic, bad because they can't be CONVERTed)
-
- 2. Should I just use datetime in each table?
- ... insert TABLE values(..., getdate(), ...)
- then
- ... select * from TABLE where date > @threshold and user = @user
-
- 3. Is there some Sybase table/feature that will allow me to meet the
- requirement directly?
-
- 4. How would you handle this requirement?
-
-
- [We use Sybase 4.8 on SunOS, if it makes any difference]
-
- --
- Jim Johnstone jimj@meaddata.com
- Mead Data Central
- P.O. Box 933 I do not speak for Mead Data Central
- Dayton, Ohio 45401
-