I am developing a Procedure using SPL,Informix Client SDK v3.0,In a single procedure I have a requirement more than one statements to be execute,in that,I need to check whether records available or not in the particular table,for this,I have tried in the routine as following way:
if (select count(*) from tablename >0)then
select a=count(*) from tablename
if a>0 then
but it is not working.can u people help me .
Pinned topic checking the count (*) in routine
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2007-11-28T18:01:44Z at 2007-11-28T18:01:44Z by Kevin_Foster
Kevin_Foster 120000GMHC9 Posts
Re: checking the count (*) in routine2007-11-28T18:01:44ZThis is the accepted answer. This is the accepted answer.You need to fetch the value that you want into an SPL variable, and then use that variable in your if statement.
Here's an example: