mnmhema
21st March 2012, 11:07
I need to use a column t_amth_1 in the table ttfgld106. How can I refer to this column in baan sql query?

bdittmar
21st March 2012, 11:49
I need to use a column t_amth_1 in the table ttfgld106. How can I refer to this column in baan sql query?

Hello,
avoid double postings, pleas.

http://www.baanboard.com/baanboard/showthread.php?t=62100

Print the table definition for tfgld106.

There's only one field amth.

select tfgld106.amth .......

But that's basics !

Regards

mnmhema
21st March 2012, 12:01
I am sorry.
There are 3 values to tfgld106.amth. I used the syntax tfgld106.amth(1).
While compiling the report, it comes with the error: Syntax error: '(' not expected

bdittmar
21st March 2012, 12:27
I am sorry.
There are 3 values to tfgld106.amth. I used the syntax tfgld106.amth(1).
While compiling the report, it comes with the error: Syntax error: '(' not expected

Hello,

your profile says BaaN IV.

Table tfgld106 is for booked transactions in general ledger and has in Std. VRC B40c4 since April 1997 only one field amth (amount in home currency).

Is your table modified ?
The shown syntax is working for array fields.

In LN it's a 3 x 8 Array !
If you use LN, update your profile, please !

Regards

mnmhema
21st March 2012, 12:35
See the attached file

bdittmar
21st March 2012, 12:47
See the attached file

SELECT tfgld106.otyp,
tfgld106.odoc,
tfgld106.oyer,
tfgld106.amth(1),
tfgld106.amth(2),
tfgld106.amth(3)
from tfgld106
where tfgld106.otyp = "110"
and tfgld106.oyer = 2012

it gives the attached result !

Regards

mnmhema
21st March 2012, 13:07
I cannot use
SELECT tfgld106.amth(1),
tfgld106.amth(2),
tfgld106.amth(3)
from tfgld106
in the report script.

mark_h
21st March 2012, 14:46
From what I read you should be able to use that query in the report script.Post the complete query and code for the layout you are using.

mnmhema
21st March 2012, 15:15
I found the solution.
I need to use "SELECT tfgld106.amth from tfgld106" in Query and Report Acript. And I have to refer to tfgld106.amth(1) in the layout field.