GAURAVGUPTA9
18th June 2002, 12:48
hi all
how can i use query.extend.select, query.extend.from , query.extend.where, i am getting compilation error
please help
regards
gaurav

FransG
18th June 2002, 13:59
The syntax is as follows:
query.extend.select(select string, [mode])
query.extend.from(from string, [mode])
query.extend.where(where string, [mode])

In the strings you can put the select/from/where part of your query.
The mode is an optional argument. It has the following values:
EXTEND_OVERWRITE replaces any existing query extension.
EXTEND_APPEND appends the extension to the existing extension.

EXTEND_OVERWRITE is the default value for mode.

Hope this helps.

GAURAVGUPTA9
18th June 2002, 14:15
Hi Frans
I tried it but it is giving compilation error "unresolved reference to function". i am using it in before.program section.
gaurav

FransG
18th June 2002, 16:46
That's no problem using query.extend in the before.program section.
Please, send a copy of your code and the exact error message.
What type of session are you working on?

Thanks.

r_nagu
18th June 2002, 16:47
Gaurav,
These functions query.extend.select, query.extend.from , query.extend.where, I don't think are available in all versions of BaaN. As far as I know, in BaaN IV, you only have query.extension.

Thanks,
NS

Peter IJpema
24th January 2017, 11:18
Make sure the variables used in the query.extend are of the type external.

Example of subsession related to and called from tccom4120s000:

declaration:
table ttdpur904 | Own-table
external domain tccom.bpid import.bpid | Import from other session

before.program:
import("tccom120.otbp", import.bpid)
query.extend.where("tdpur904.otbp = :import.bpid")


Result: if the imported business partner exists in table ttdpur904 it will display as first line (single line) depending on the sub-session-type.