EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

unable to run the query  XML

Forum Index » Tuning and Migration Wizard
Author Message
Srikanth_Kata_2

New member

Joined: 3 Jul 2010 05:53:56
Messages: 1
Offline

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

When i run this query i am facing the following error:

ERROR: there is no parameter $1
LINE 3: ...no inner join (select subsno from getexpiringsubs($1,cast($2...
^

********** Error **********

ERROR: there is no parameter $1
SQL state: 42P02
Character: 277


Please let me know the issue on srikanth@inventum.net
Sachin_S

Senior member

Joined: 1 Aug 2008 02:37:24
Messages: 445
Offline

Hello,

Please specify a lot more detail as:

i) Whether you are running PostgreSQL, PostgresPlus Standard Server, Postgres Plus Advanced Server?
ii) What version?
iii) What Operating System?

Also as we have no idea about the schema and your data, its very hard to guess what is *wrong*, can you be more specific as what you wanted to achieve and how you are going about it?

Lastly you may want to post it to a correct Forum Index . (As this is Tuning and Migration Wizard Index of the forum)

--
Regards,
Sachin Srivastava
EnterpriseDB , the Enterprise Postgres company.
Vibhor_K

Senior member
[Avatar]

Joined: 3 Jul 2009 09:46:15
Messages: 444
Offline

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


Seems you are not using static value for $1, $2...

Please keep the static value/Column name and it should work.

Please note:: Select query always contains static values or Column name. If Query is a part of function, then these $1,$2... will be replaced by the variables values/passing values to function.

Thanks & Regards,
Vibhor Kumar
Blog:http://vibhork.blogspot.com
[Email] [WWW]
 
Forum Index » Tuning and Migration Wizard
Go to:   
Powered by JForum 2.1.8 © JForum Team