Sandy Blondino
2nd June 2014, 22:10
Hello,
I get the 'Pseudo var '1' not binded before classic_sql_exec() error when running a report script with the following SQL query.
I think this is a standard format that we've used in the past, but now it's giving me errors. Can anyone see what I'm doing wrong?

select ticst001.sitm, ticst001.opol, ticst001.pdno
from ticst001
where ticst001._index3 = {:ticst001.sitm}
and ticst001._index1 = {:tisfc001.pdno}
and ticst001.opol = :1
selectdo
on.hand.qty = tdilc101.stks
endselect

Thanks for your help,
Sandy

bhushanchanda
2nd June 2014, 23:02
Hi,

Check these threads:-

1 (http://www.baanboard.com/baanboard/showthread.php?t=1283)
2 (http://www.baanboard.com/baanboard/showthread.php?t=27492&highlight=variable+order+clause)
3 (http://www.baanboard.com/baanboard/showthread.php?p=134605)

Sandy Blondino
2nd June 2014, 23:17
I really don't see anything that is similar to my problem.
I'm not passing a value from a sub-session. It's just a simple query using an enumerated value in the select clause.

I'm sure I've done this type of query before, but now it's giving the error.

bhushanchanda
2nd June 2014, 23:49
Hi,

I don't see you have binded the "1" in your where clause using wherebind.

Check this thread (http://www.baanboard.com/baanboard/showthread.php?t=14951) to get some ideas.

You are using the pseudo variable and haven't really binded it which is a possible cause of the issue.

JaapJD
3rd June 2014, 09:51
I think you should either code

and ticst001.opol = 1

(without the colon!)
or

and ticst001.opol = tcittb.standard

vamsi_gujjula
3rd June 2014, 11:42
AS Jaap said use 1 or tcittb.standard ,

:1 this is a syntax for explicit binding