Re: Unable to run this query

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Srikanth Kata <srikanth(at)inventum(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unable to run this query
Date: 2010-07-05 07:20:21
Message-ID: AANLkTimM6V3l825vygoiyIvevTaF99e8_MT-j16czI63@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2010/7/5 Srikanth Kata <srikanth(at)inventum(dot)net>:
>
> I am not able to run this query in Postgres 8.4 and the OS is Linux Centos 5.
>
> I have dump of the DB, but in clients place this query is taking lots of
> time but no errors.
>
> Please suggest me what is the case to rectify this error.
>
> select
> s.*,a.actid,a.phone,d.domid,d.domname,d.domno,a.actno,a.actname,p.descr
> as svcdescr from vwsubsmin s
> inner join packages p on s.svcno=p.pkgno
> inner join account a on a.actno=s.actno
> inner join ssgdom d on a.domno=d.domno
> inner join (select subsno from getexpiringsubs($1,cast($2 as
> integer),cast($3 as double precision), $4) as
> (subsno int,expirydt timestamp without time zone,balcpt double precision))
> as e on s.subsno=e.subsno
> where s.status<=15 and d.domno=$5
> order by d.domname,s.expirydt,a.actname
>
> It is showing the error as ERROR:  THERE IS NO PARAMETER $1
> LINE 1: ...no inner join (select subsno from getexpiringsubs($1,cast($2..

probably use a wrong API. Your query uses parameters - $1, $2, ... but
you are not define these parameters in your code.

Regards
Pavel Stehule

> --
> View this message in context: http://old.nabble.com/Unable-to-run-this-query-tp29073430p29073430.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Saitenheini 2010-07-05 08:20:30 Re: C-Functions using SPI - Missing Magic Block
Previous Message Srikanth Kata 2010-07-05 07:16:32 Unable to run this query