pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with the postgresql operator.
4+ messages / 4 participants
[nested] [flat]
* Problem with the postgresql operator.
@ 2002-01-15 06:39 KH Lim <limspirit@hotmail.com>
2002-01-15 10:35 ` Re: Problem with the postgresql operator. Oliver Elphick <olly@lfix.co.uk>
2002-01-15 15:56 ` Re: Problem with the postgresql operator. GB Clark <gclarkii@vsservices.com>
2002-01-15 19:10 ` Re: Problem with the postgresql operator. Josh Berkus <josh@agliodbs.com>
0 siblings, 3 replies; 4+ messages in thread
From: KH Lim @ 2002-01-15 06:39 UTC (permalink / raw)
To: pgsql-sql
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with the postgresql operator.
2002-01-15 06:39 Problem with the postgresql operator. KH Lim <limspirit@hotmail.com>
@ 2002-01-15 10:35 ` Oliver Elphick <olly@lfix.co.uk>
2 siblings, 0 replies; 4+ messages in thread
From: Oliver Elphick @ 2002-01-15 10:35 UTC (permalink / raw)
To: KH Lim <limspirit@hotmail.com>; +Cc: pgsql-sql
On Tue, 2002-01-15 at 06:39, 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?
The operator is !=
--
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
stand at the latter day upon the earth"
Job 19:25
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with the postgresql operator.
2002-01-15 06:39 Problem with the postgresql operator. KH Lim <limspirit@hotmail.com>
@ 2002-01-15 15:56 ` GB Clark <gclarkii@vsservices.com>
2 siblings, 0 replies; 4+ messages in thread
From: GB Clark @ 2002-01-15 15:56 UTC (permalink / raw)
To: KH Lim <limspirit@hotmail.com>; +Cc: pgsql-sql
On Tue, 15 Jan 2002 14:39:54 +0800
"KH Lim" <limspirit@hotmail.com> 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?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Problem with the postgresql operator.
2002-01-15 06:39 Problem with the postgresql operator. KH Lim <limspirit@hotmail.com>
@ 2002-01-15 19:10 ` Josh Berkus <josh@agliodbs.com>
2 siblings, 0 replies; 4+ messages in thread
From: Josh Berkus @ 2002-01-15 19:10 UTC (permalink / raw)
To: KH Lim <limspirit@hotmail.com>; pgsql-sql
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
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-01-15 19:10 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-01-15 06:39 Problem with the postgresql operator. KH Lim <limspirit@hotmail.com>
2002-01-15 10:35 ` Oliver Elphick <olly@lfix.co.uk>
2002-01-15 15:56 ` GB Clark <gclarkii@vsservices.com>
2002-01-15 19:10 ` Josh Berkus <josh@agliodbs.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox