pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedInvalid Input syntax for type bigint
2+ messages / 2 participants
[nested] [flat]
* Invalid Input syntax for type bigint
@ 2005-01-23 22:59 Ryan Miranda <ryan.miranda@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Ryan Miranda @ 2005-01-23 22:59 UTC (permalink / raw)
To: 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_task
INNER JOIN ix_workflow_instance ON
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" = 0
AND ("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');
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Invalid Input syntax for type bigint
@ 2005-01-24 04:10 Michael Fuhr <mike@fuhr.org>
parent: Ryan Miranda <ryan.miranda@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2005-01-24 04:10 UTC (permalink / raw)
To: Ryan Miranda <ryan.miranda@gmail.com>; +Cc: pgsql-sql
On Sun, Jan 23, 2005 at 02:59:36PM -0800, Ryan Miranda wrote:
> 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?
Apparently you're trying to use a date where a bigint is expected.
One possibility might be here:
> SELECT ix_workflow_task."DATE_COMPLETED",
> ix_workflow_task."WORKFLOW_ACTIVITY_XPDL_ID", ix_workflow_task."TYPE"
> INTO workflow_t from ix_workflow_task
You declared workflow_t to be ix_workflow_task%ROWTYPE but you're
only selecting certain fields into it. Is the first field in
ix_workflow_task perchance a bigint?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-01-24 04:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-01-23 22:59 Invalid Input syntax for type bigint Ryan Miranda <ryan.miranda@gmail.com>
2005-01-24 04:10 ` Michael Fuhr <mike@fuhr.org>
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