| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 3 Jul 2010 06:00:54
|
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
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 3 Jul 2010 06:36:32
|
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.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 3 Jul 2010 09:07:16
|
Vibhor_K
Senior member
![[Avatar]](/images/avatar/6b1086f5fb6b725a975602564298d4b9.jpg)
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
|
|
|
 |
|
|
|
|