home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / database / sybase / 773 < prev    next >
Encoding:
Text File  |  1993-01-28  |  1.5 KB  |  53 lines

  1. Newsgroups: comp.databases.sybase
  2. Path: sparky!uunet!pipex!bnr.co.uk!bnrgate!nott!torn!spool.mu.edu!yale.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!julienas!genethon!stuart
  3. From: stuart@genethon.fr (Stuart Pook)
  4. Subject: patindex broken between 4.2 and 4.8
  5. Message-ID: <1993Jan28.154119@genethon.fr>
  6. Originator: stuart@genethon2.genethon.fr
  7. Keywords: patindex
  8. Sender: news@genethon.fr
  9. Nntp-Posting-Host: genethon2.genethon.fr
  10. Organization: Genethon -- Human Genome Research Centre
  11. Date: Thu, 28 Jan 1993 14:41:19 GMT
  12. Lines: 39
  13.  
  14.  
  15. Has anybody noticed that patindex has been broken
  16. between Sybase versions 4.2 and 4.8?  The following
  17. scripts illustrate how patindex used to be correct
  18. (under 4.2) and how it now gives the wrong result.
  19.  
  20. Does the same problem exist under 4.9?
  21.  
  22. $ sql -SGENGDB
  23. 1> select @@version
  24. 2> go
  25.                                                                    
  26.  ----------------------------------------------------------------- 
  27.  SQL Server/4.2/P/sun4/os4/EBF632/OPT/Tue Aug 27 11:58:42 PDT 1991 
  28.  
  29. (1 row affected)
  30. 1> select patindex("%[^0]%", "000")
  31. 2> go
  32.              
  33.  ----------- 
  34.            0 
  35.  
  36. (1 row affected)
  37.  
  38. $ sql -SGENETHON
  39. 1> select @@version
  40. 2> go
  41.                                                                        
  42.  --------------------------------------------------------------------- 
  43.  SQL Server/4.8/P/Sun 4/SunOS 4.1.X/5/OPT/Fri Apr 24 10:15:10 PDT 1992 
  44.  
  45. (1 row affected)
  46. 1> select patindex("%[^0]%", "000")
  47. 2> go
  48.              
  49.  ----------- 
  50.            3 
  51.  
  52. (1 row affected)
  53.