Invalid Input syntax for type bigint - Mailing list pgsql-sql

From Ryan Miranda
Subject Invalid Input syntax for type bigint
Date
Msg-id 690e0bf70501231459ed3cb51@mail.gmail.com
Whole thread Raw
Responses Re: Invalid Input syntax for type bigint  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
hello everyone,

I am trying to run the proc below but get an error : invalid input
syntax for type bigint: "2004-10-26" Can anyone suggest what I am
doing wrong here?

Rx

-- Function: public.getdateallocated(date, date)

DROP FUNCTION public.getdateallocated(date, date);

CREATE OR REPLACE FUNCTION public.getdateallocated(date, date) RETURNS text AS
'Declare

workflow_t  ix_workflow_task%ROWTYPE;


BEGIN


       SELECT ix_workflow_task."DATE_COMPLETED",
ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID", ix_workflow_task."TYPE"INTO workflow_t from ix_workflow_taskINNER JOIN
ix_workflow_instanceON
 
ix_workflow_task."WORKFLOW_INSTANCE_KEY" =
ix_workflow_instance."WORKFLOW_INSTANCE_KEY"INNER JOIN ix_workflow_instance_to_domain ON
ix_workflow_instance_to_domain."WORKFLOW_INSTANCE_KEY" =
ix_workflow_instance."WORKFLOW_INSTANCE_KEY"INNER JOIN ix_core_case ON
ix_workflow_instance_to_domain."DOMAIN_KEY" =
ix_core_case."CORECASEKEY"where to_char(ix_workflow_task."DATE_COMPLETED", \'DD-MM-YYYY\') <> \'\'AND
ix_core_case."DELETED"= 0AND ("CORECASEKEY" in (select * FROM getStatusSwitch($1,$2,
 
\'Assessment\', \'Prosecution\'))             OR "CORECASEKEY" in (select * from
getStatusSwitch($1,$2, \'Assessment\', \'Investigation\'))             OR "CORECASEKEY" in (select * from
getStatusSwitch($1,$2, \'Assessment\', \'Other\')))    group by  ix_workflow_task."DATE_COMPLETED",
ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID", ix_workflow_task."TYPE"having
(lower(ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID")LIKE
 
\'organise surveillance - 9b\' AND ix_workflow_task."TYPE" = \'Human\'            or
lower(ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID")
LIKE \'start case mix workflow - 9\' AND ix_workflow_task."TYPE" =
\'System\'     or    lower(ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID") LIKE
\'finalise case - 13\' AND ix_workflow_task."TYPE" = \'Human\'     or
lower(ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID")LIKE
 
\'complete final priority smart form - 39\' AND
ix_workflow_task."TYPE" = \'Human\'     or    lower(ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID") LIKE
\'check for case mix type - 17\' AND ix_workflow_task."TYPE" =
\'System\')       and (ix_workflow_task."DATE_COMPLETED" >= $1 and
ix_workflow_task."DATE_COMPLETED" <= $2);

return workflow_t."WORKFLOW_ACTIVITY_XPDL_ID" ||
to_char(workflow_t."DATE_COMPLETED", \'DD-MM-YYYY\');

END;

' LANGUAGE 'plpgsql' VOLATILE;

select getdateallocated('10/10/04','12/12/04');


pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: returning a record from PL/pgSQL
Next
From: Mihail Nasedkin
Date:
Subject: Re: OID's