🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #212

Re: Functions in SQL

#212
From: Steve Koterski
Date: Fri, 08 Jan 1999 00:00
30 lines
1914 bytes
On Fri, 8 Jan 1999 06:45:48 +0200, "Robert" <me@u.com> wrote:

>Does SQL Server natively support the following functions in SQL: IIF,
>Sqrt, ^ (power), Abs, Random, Like?
>
>In other words, will it run the following without adding custom function
>libraries:
>
>SELECT ID FROM Test WHERE ((Abs(10-Test.Field1)<11) AND (Like("*elephant*,
>Test.Field2))) ORDER BY SQRt(Test.Field3^2+Test.Field4^2),Random([ID]);

If Microsoft SQL Server (or any database server, for that matter) supports
these functions, it would be as nonstandard syntax. Standard SQL, as
defined by the SQL-92 specification, does not include any of those
functions. I can guarantee that local SQL does not include any
implementation of these functions. InterBase does not either, but they
could be added using user-defined functions.

Standard SQL does include a LIKE predicate (not a function). It is used in
a manner similar to comparison operators. For example:

  SELECT *
  FROM YourTable
  WHERE LastName LIKE "Smi%"

//////////////////////////////////////////////////////////////////////////
Steve Koterski                      "I do most of my writing sitting down.
Technical Publications              That's where I shine."
INPRISE Corporation                         -- Robert Benchley (1889-1945)
http://www.inprise.com/delphi
Technical Details
Message-ID: <369746ba.4804879@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7749st$gqj6@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,bee70b039be8a781
X-Google-Attributes: gidff5a1,public
From: skoterski@NOSPAMinprise.com (Steve Koterski)
Subject: Re: Functions in SQL
Date: 1999/01/08
Message-ID: <369746ba.4804879@forums.inprise.com>
X-Deja-AN: 430260362
Content-Transfer-Encoding: 7bit
References: <7749st$gqj6@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: INPRISE Corporation, Technical Publications
Mime-Version: 1.0
Reply-To: skoterski@NOSPAMinprise.com
Newsgroups: borland.public.vdbase.data.sql