home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.sybase
- Path: sparky!uunet!ukma!gatech!concert!glv!usenet
- From: bob@bobsled.glv.com (Bob Lunney)
- Subject: Re: patindex broken between 4.2 and 4.8
- Message-ID: <1993Jan28.195104.10557@glv.uucp>
- Keywords: patindex, bugs
- Sender: usenet@glv.uucp
- Nntp-Posting-Host: bobsled
- Organization: Encompass
- References: <1993Jan28.154119@genethon.fr>
- Date: Thu, 28 Jan 1993 19:51:04 GMT
- Lines: 59
-
- In article <1993Jan28.154119@genethon.fr> stuart@genethon.fr (Stuart Pook)
- writes:
- >
- > Has anybody noticed that patindex has been broken
- > between Sybase versions 4.2 and 4.8? The following
- > scripts illustrate how patindex used to be correct
- > (under 4.2) and how it now gives the wrong result.
- >
- > Does the same problem exist under 4.9?
- >
- > $ sql -SGENGDB
- > 1> select @@version
- > 2> go
- >
- > -----------------------------------------------------------------
- > SQL Server/4.2/P/sun4/os4/EBF632/OPT/Tue Aug 27 11:58:42 PDT 1991
- >
- > (1 row affected)
- > 1> select patindex("%[^0]%", "000")
- > 2> go
- >
- > -----------
- > 0
- >
- > (1 row affected)
- >
- > $ sql -SGENETHON
- > 1> select @@version
- > 2> go
- >
- > ---------------------------------------------------------------------
- > SQL Server/4.8/P/Sun 4/SunOS 4.1.X/5/OPT/Fri Apr 24 10:15:10 PDT 1992
- >
- > (1 row affected)
- > 1> select patindex("%[^0]%", "000")
- > 2> go
- >
- > -----------
- > 3
- >
- > (1 row affected)
-
-
- Works fine on our VAXes:
-
- 1> select @@version
- 2> go
-
- ------------------------------------------------------------
- SQL Server/4.8/EBF1068/VMS/5.4-1A+/5/30-SEP-1992 14:08:42.15
-
- (1 row affected)
- 1> select patindex("%[^0]%", "000")
- 2> go
-
- -----------
- 0
-
- (1 row affected)
-