home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!spool.mu.edu!agate!ucbvax!mtxinu!sybase!andy
- From: andy@sybase.com (Andy Cohen)
- Newsgroups: comp.databases.sybase
- Subject: Re: Matching quotes
- Message-ID: <27411@sybase.sybase.com>
- Date: 21 Dec 92 23:57:02 GMT
- References: <1foqtpINNah1@agate.berkeley.edu>
- Sender: news@Sybase.COM
- Distribution: usa
- Organization: Sybase, Inc.
- Lines: 22
-
- jeklund@jeklund.berkeley.edu writes:
-
- > Has anyone got an elegant, user-friendly solution to the
- > Sybase ""matching quotes"" requirement in a character field?
- > I expect that some kind of stored procedure that is
- > executed on update is the answer but has anyone done this?
- > I find it a bit awkward to enter two single quotes
- > every time I want to include an apostrophe or two
- > double quotes whenever I want to include a ""quote.""
- > There doesn't appear to be any way to change the delimiter
- > in Sybase.
-
- This may or may not qualify as either elegant or user-friendly,
- but an application program can use the dbsafestr() call, which is
- part of DB-Library. This routine will double any and all quotes in
- a character string, making that string "safe" for inclusion within
- any SQL statement.
-
- Hope this helps,
-
- Andy Cohen
- Sybase, Inc.
-