From limspirit@hotmail.com Tue Jan 15 06:40:09 2002 Received: from hotmail.com (oe67.pav2.hotmail.com [64.4.36.201]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0F6e9V68111 for ; Tue, 15 Jan 2002 01:40:09 -0500 (EST) (envelope-from limspirit@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 14 Jan 2002 22:40:09 -0800 X-Originating-IP: [202.188.31.226] From: "KH Lim" To: Subject: Problem with the postgresql operator. Date: Tue, 15 Jan 2002 14:39:54 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0005_01C19DD2.7F034BE0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 15 Jan 2002 06:40:09.0560 (UTC) FILETIME=[79FD1D80:01C19D8F] X-Archive-Number: 200201/161 X-Sequence-Number: 6247 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C19DD2.7F034BE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Dear All, What is the correct operator for not equal to in select statement? I'm = a bit confuse. Situation Let say I want to select stock_key from stock_lot with the condition stock_= lot's lot_no is not equal to stocks' lot_no. What select statement should I= use? Thank you in advance Lim ------=_NextPart_000_0005_01C19DD2.7F034BE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Dear All,
 
    What is the correct ope= rator for=20 not equal to in select statement? I'm a bit=20 confuse.
 
Situation
 
Let say I want to select stock_key from st= ock_lot=20 with the condition stock_lot's lot_no is not equal to=20 stocks' lot_no. What select statement should I use?
 
Thank you in advance
 
Lim
------=_NextPart_000_0005_01C19DD2.7F034BE0-- From olly@lfix.co.uk Tue Jan 15 10:34:01 2002 Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FAY0V28020 for ; Tue, 15 Jan 2002 05:34:01 -0500 (EST) (envelope-from olly@lfix.co.uk) Received: from lfix.demon.co.uk ([158.152.59.127] helo=linda.lfix.co.uk) by anchor-post-31.mail.demon.net with esmtp (Exim 2.12 #1) id 16QQuo-000Iag-0V; Tue, 15 Jan 2002 10:34:02 +0000 Received: from localhost.localdomain (olly@localhost [127.0.0.1]) by linda.lfix.co.uk (8.12.1/8.12.1/Debian -5) with ESMTP id g0FAZNcb005531; Tue, 15 Jan 2002 10:35:23 GMT Subject: Re: Problem with the postgresql operator. From: Oliver Elphick To: KH Lim Cc: pgsql-sql@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-Zcd1yHkJpSxsaGDn1igO" X-Mailer: Evolution/1.0 (Preview Release) Date: 15 Jan 2002 10:35:22 +0000 Message-Id: <1011090923.9010.32.camel@linda> Mime-Version: 1.0 X-Archive-Number: 200201/162 X-Sequence-Number: 6248 --=-Zcd1yHkJpSxsaGDn1igO Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2002-01-15 at 06:39, KH Lim wrote: > Dear All, >=20 > What is the correct operator for not equal to in select statement? I'= m a bit confuse. >=20 > Situation >=20 > Let say I want to select stock_key from stock_lot with the condition stoc= k_lot's lot_no is not equal to stocks' lot_no. What select statement should= I use? The operator is !=3D=20 --=20 Oliver Elphick Oliver.Elphick@lfix.co.uk Isle of Wight http://www.lfix.co.uk/oliver GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C "For I know that my redeemer liveth, and that he shall=20 stand at the latter day upon the earth"=20=20=20=20=20=20=20=20=20=20= =20=20=20 Job 19:25=20 --=-Zcd1yHkJpSxsaGDn1igO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA8RAXqYU1MND4dDBwRAoP2AJ9JxWgw2ZPJiCAzrSXuRE0QwDStCwCeIdOJ 38joHKrGEzbQBQ7Lg4BJDxc= =kd5I -----END PGP SIGNATURE----- --=-Zcd1yHkJpSxsaGDn1igO-- From gclarkii@vsservices.com Tue Jan 15 15:56:24 2002 Received: from primus.vsservices.com (primus.vsservices.com [63.66.136.75]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FFuOV89406 for ; Tue, 15 Jan 2002 10:56:24 -0500 (EST) (envelope-from gclarkii@vsservices.com) Received: from prime.vsservices.com (conr-adsl-dhcp-26-38.txucom.net [209.34.26.38]) by primus.vsservices.com (8.11.3/8.11.3) with SMTP id g0FFuRB67729; Tue, 15 Jan 2002 07:56:27 -0800 (PST) (envelope-from gclarkii@vsservices.com) Date: Tue, 15 Jan 2002 09:56:29 -0600 From: GB Clark To: "KH Lim" Cc: pgsql-sql@postgresql.org Subject: Re: Problem with the postgresql operator. Message-Id: <20020115095629.56e49d68.gclarkii@vsservices.com> In-Reply-To: References: X-Mailer: Sylpheed version 0.6.6 (GTK+ 1.2.10; i386-unknown-freebsd4.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/224 X-Sequence-Number: 6308 On Tue, 15 Jan 2002 14:39:54 +0800 "KH Lim" wrote: > Dear All, > > What is the correct operator for not equal to in select statement? I'm a bit confuse. > > Situation > > Let say I want to select stock_key from stock_lot with the condition stock_lot's lot_no is not equal to stocks' lot_no. What select statement should I use? > > Thank you in advance > > Lim > Just use the standard SQL... <> Works just fine and it is in the books. GB -- GB Clark II | Roaming FreeBSD Admin gclarkii@VSServices.COM | General Geek CTHULU for President - Why choose the lesser of two evils? From josh@agliodbs.com Tue Jan 15 19:10:07 2002 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FJA7V18274 for ; Tue, 15 Jan 2002 14:10:07 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.2) with HTTP id 620154; Tue, 15 Jan 2002 11:10:05 -0800 From: "Josh Berkus" Subject: Re: Problem with the postgresql operator. To: "KH Lim" , X-Mailer: CommuniGate Pro Web Mailer v.3.5.2 Date: Tue, 15 Jan 2002 11:10:05 -0800 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200201/172 X-Sequence-Number: 6258 KH Lim, In the future, this sort of question is more appropriate for the PGSQL-NOVICE list. > What is the correct operator for not equal to in select statement? I'm a > bit confuse. > > Situation > > Let say I want to select stock_key from stock_lot with the condition > stock_lot's lot_no is not equal to stocks' lot_no. What select statement > should I use? SQL92 Standard Syntax (works on PostgreSQL): WHERE stock_lot.lot_no <> stocks.lot_no Not SQL92 Standard, but also works on PostgreSQL: WHERE stock_lot.lot_no != stocks.lot_no You should also pick up an introduction to PostgreSQL and to SQL in general. See http://techdocs.postgresql.org/bookreviews.php for several book suggestions. In English, "Database Queries for Mere Mortals" is a good one for novices. If you need a book in another language, e-mail me back and I'll try to locate a book that has been translated into your preferred tongue. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco