mjpedreira1
15th December 2009, 17:39
Hello,

I´m working with tssma230 table. This table has only 3 fields:

--------------------------------------------------------
Nombre campo | Ámbito | T. datos Long.
---------------+-------------------------------------+--
1 bkyr | tssma.bkyr | Integer (e 2
2 psdt | tssma.psdt | Fecha (fec 52 x 4
3 pedt | tssma.pedt | Fecha (fec 4

I need, for the actual year, to select all the records bigger than the actual period.

The psdt field, is an array, with 52 elements. The name for every element is t$psdt$1, t$psdt$2, t$psdt$3, etc. The value for the fields are dates.
How can I determinate the records bigger that the actual period¿?

Thanks,

María José

NPRao
15th December 2009, 19:59
You can use the 'wherebind' clause for the query. Refer to - Embedded SQL (http://www.baanboard.com/programmers_manual_baanerp_help_functions_database_handling_embedded_sql)

sameer.don
16th December 2009, 04:36
Hi María
you can mention array element in "(...)"
for e.g. you can use array fields in table as:

select tssma230.*
from tssma230
where tssma230.psdt(1) > :date.f or tssma230.psdt(2) > :date.f
endselect

mjpedreira1
16th December 2009, 10:42
Sorry, I forget to say that I do my query Oracle's table directly

sameer.don
16th December 2009, 12:40
In this case you have one oracle table field associated with every array element in Baan table.
so where exactly is it causing problem.