HI in reading this is it possible what was really intended :
Sum(case when o_model = 5 then 1 else NULL end) as KA
That would provide a count of all records meeting that condition.
Otherwise the count( approach will not do that.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
In case it is a version issue:
This should always work regardless of version:
Just cast the $1 variable as text followed by interval:
create or replace function test(integer) returns setof text as $$
declare
a record;
begin
select into a now() - ($1::text||'days')::interval;
retu
Hi Not sure about $1 parms : you may need to use a variable to set $1 to
then cast it as interval :
create or replace function test(integer) returns setof text as $$
declare
a record;
begin
select into a now() - ($1::text||'days')::interval;
return next a;
return;
end
$$
Try this one:
SELECT date_trunc('seconds',now())::time;
"15:11:42"
So it should be select date_trunc('seconds', fecha_hora_factura)::time
from nota_venta;
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joe
Sent: Thursday, November 16, 2006 2:24 PM
To:
What difference do you want to see? .
Looks like your email got truncated. Please resend. There is not enough
information to determine what is wanted.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Penchalaiah P.
Sent: Thursday, November 02, 2006
4:50 AM
To: pgs
not understand the syntax.
> Thanks in advance
> Hector Villarreal
> SELECT a.timestamp::timestamptz from (SELECT '2006-10-03
> 09:00'||"timezone" as timestamp from storetz where id = 1) as a;
>timestamp
>
> -Original Message-
>
Hi
I am also interested in this type of setup. However, in the example
below
I am a little confused as to why the table entry is 1, -3
And the subsequent select statement . I would appreciate an explanation
on the select statement. I do not understand the syntax.
Thanks in advance
Hector