home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / sybase / 640 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  1.2 KB

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