Hi!
I've got 2 date fields in table which constitute a term. On select I'm
calculating that term, BUT I can't figure out how to refer to it in the
sql - or if it's possible. I'd like to be able to use the case returned
value for order, comparing, etc. Here's an example:
select case when (curre
On Mon, 1 Jul 2002, Nick Riemondi wrote:
Just rewrite your case statement in the where clause.
> Hi!
> I've got 2 date fields in table which constitute a term. On select I'm
> calculating that term, BUT I can't figure out how to refer to it in the
> sql - or if it's possible. I'd like to be ab
hello all,
in my program I have to check for a certain combination of data before I
make an insert. The check is a select statement with a join and a
function call. Now, I wonder if I could gain performance if I would
create a temporary view that contained this join and the function call
and
> select case when (current_date > available) then ((end_date -
> current_date) / 30)
> when (current_date < available) then ((end_date - available) /
> 30)
>end
>from listing
>where case > 4
>
> which yields:
> ERROR: parser: parse error at or near ">"
>
> Doe
I finally thought to try this about an hour after posting. Doh! Works
perfectly.
Thanks!
[EMAIL PROTECTED] writes:
>On Mon, 1 Jul 2002, Nick Riemondi wrote:
>
>Just rewrite your case statement in the where clause.
>
>> Hi!
>> I've got 2 date fields in table which constitute a term. On select I
I am sure.
I assume that
pg_restore -t mytable -d mydb mydumpfile
is same as
pg_restore --table=mytable --dbname=mydb mydumpfile
but it is not!
the 2nd one will get:
pg_restore: [archiver] could not open input file: No such file or directory
Jie Liang
-Original Message-
From: Jan W
Hi,
I have this query:
select * from reo inner join usr on reo.owner_id=usr.user_id
I also have created these indexes:
CREATE INDEX "owner_id_reo_key" ON reo (owner_id);
CREATE INDEX "user_id_user_key" ON usr (user_id);
Explain tells me this:
Merge Join (cost=1341.74..1481.12 rows=299697 width