rabbeneg
8th January 2003, 20:23
I have write this function :

function load_contoRiclassificato()
{

select tffst121.*
from tffst121
where tffst121.fstm(1;2) = "B-"
and tffst121.lacf <= :tfcit202.leac
and tffst121.lact >= :tfcit202.leac
and tffst121.dimf(1) <= :1
|and tffst121.dimt(1) >= :1
wherebind(1,tfcit202.dimx)
|as set with 1 rows
selectdo
select tffst120.*
from tffst120
where tffst120._index1 = {:tffst121.fstm,:tffst121.accn}
selectdo
endselect
endselect
}

But during execution i receive the following message:

Error: Wrong operation on array field 'dimf'
Fatal Error: Error 304 (General SQL Error) on SELECT

an ideas??????

mark_h
9th January 2003, 00:00
Well it looks like the problem is caused by this line - where tffst121.fstm(1;2) = "B-". Not sure if the like command would work for you. Anyway here are some posts that may help you - post 1 (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=6831&highlight=wherebind),post 2 (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=5905&highlight=part+number) . You can do some others searchs using keywords like array, wherebind and even tiitm001. The tiitm001 search has at least one post discussing the like command.

Good Luck!

Mark

NPRao
9th January 2003, 01:15
I am not sure, I couldnt find those tables on our system.

I suspect the error might be due to these statements -

wherebind(1,tfcit202.dimx)
......
{:tffst121.fstm,:tffst121.accn}

I am not sure if they are multi dimensional or not...

here is an example for you -

select ttadv420.*
from ttadv420
where ttadv420._index1 between {:cpac, :1, :2}
and {:cpac, :3, :4}
wherebind (1, table.code(1;3))
wherebind (2, table.code(4;3))
wherebind (3, table.code(1;3))
wherebind (4, table.code(4;3))
order by ttadv420._index1
selectdo
.....
endselect

You can search more for the syntax in the tools manual or on the board with the keyword - wherebind