Try:
SELECT COALESCE(CURVALUE,1) FROM TABLEKEYS WHERE
TABLENAME = 'BUYER';
- Original Message -
From:
George Henry C.
Daswani
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, October 31, 2000 5:52
PM
Subject: [SQL] Problem with
coalesce..
> update users set enabled='f',disablereason='We do not allow our
> system to be used for SPAM.' where id in (select id from users where
> loginid in (select distinct loginid from logins where
> ip='123.123.12.12'));
Would it run better as:
update users set enabled='f',disablereason='We do not a
Try NULL rather than ''. '' is not a null in postgres.
- Original Message -
From: Shalini shikha <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 10, 2000 3:15 PM
Subject: [SQL] problem with date
> How can I insert/update a null value in a date field. If a try a sql
> s
> UPDATE entry_stats
> SET entry_maxprice=MAX(item_price)
> FROM item
> WHERE item.item_entry_id=NEW.item_entry_id
> AND item.item_live = 't';
Try
COALESCE(MAX(item_price),0)
Christopher J.D. Currie
Computer Technician
Dalhousie: DalTech - CTE
_
> It works for me, for example, this way:
> athens% psql -d template1 -c "select datname from pg_database"
Thanks, I feel a little sheepish at not trying it with quotes around the
query, but the manuals don't mention that you have to enclose the query in
quotes when you use the -c option.
-Chris
I was wondering if anyone could help me out with the syntax of
running queries from a unix script.
psql -c select 'I am a dummy' -d dbname - never seems to
work. I've tried variations on the command line, but to no
success.
Does the -c option work?
Cheers,
Christopher Currie
_
I imagine it should if you create a unique index on the field.
Cheers,
Christopher Currie
- Original Message -
From: K Parker <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 27, 2000 1:52 AM
Subject: [SQL] Re: unique sequences
> > Rather, each time you wish to do an in
I have not seen much information about this anywhere on the
web.
If anyone has seen, or written a function similar, could you
please let me know where?
Thanks.