Go Back > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor


How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
200 - 500 GB
500 - 800 GB
800 - 1200 GB
1200 - 1500 GB
1500 - 2000 GB
> 2000 GB
Total votes: 83

Baanboard at LinkedIn

Reference Content

Thread Tools Display Modes
Old 21st March 2003, 08:12
Andron Andron is offline
Junior Member
Join Date: Apr 2002
Location: Russia
Posts: 11
Andron is on a distinguished road
Baan: 4 - DB: Informix 10 - OS: AIX
Query.extension vs

table tabA |Main table
|field tabA.F1, F2 is primary key of tabA

table tabB
|field tabB.F2 is primary key of tabB


N=argv$(1) - export from other session

|This is don't work correctly
query.extension="tabA.F1=:N and tabB.F2=:tabA.F2 and tabB.F3 = const1"

*********** OR **************

|It works correctly
select tabB.F3 from tabB
where tabB.F2=:tabA.F2
if tabB.F3 <> const1 then"")

How correctly to design query.extension in section "before.program"?
Reply With Quote
Old 21st March 2003, 08:41
morpheus's Avatar
morpheus morpheus is offline
Join Date: Jun 2002
Location: Planet of the apes
Posts: 369
morpheus is on a distinguished road
Baan: BaaN IV c4 - DB: BaaN Base - OS: HP-UX 11
First of all query.extension works for the main table of the session.
Secondly, I am not sure whether :tabA.F2 has got any value!!
Reply With Quote
Old 21st March 2003, 15:51
evesely's Avatar
evesely evesely is offline
Join Date: Dec 2001
Location: Lisle, Illinois USA
Posts: 414
evesely is on a distinguished road
You can add elements that contain other tables to the query.extension, but since the query itself is on the main table, these extra elements should be subqueries. This, however, will not allow the population of fields from the secondary table(s); it is for limiting the records selected.

Example with main table tdsls045 where you only want to show deliveries from orders with order type 123.
query.extension = "exists (select tdsls040.cotp 
			from tdsls040 
			where tdsls040._index1 = {tdsls045.orno}
			and tdsls040.cotp = ""123"")"
Reply With Quote
Old 21st March 2003, 16:14
Dikkie Dik's Avatar
Dikkie Dik Dikkie Dik is offline
Join Date: Sep 2002
Location: Netherlands
Posts: 585
Dikkie Dik is on a distinguished road
Baan: Triton 3.0 and higher - DB: All - OS: All
When using BaanERP query.extend can work on more than only the main table. The following fucntions exists:

So in your case (assuming tabA is the main table) you probably should say:

query.extend.from(", tabB")
query.extend.where ="tabA.F1=:N and tabB.F2=:tabA.F2 and tabB.F3 = const1"

Hope this helps,
BTW: this post has been made on my personal view. My employer might not share my point of view.
Reply With Quote
Old 13th January 2020, 09:55
srkndnsn srkndnsn is offline
Join Date: Aug 2016
Posts: 33
srkndnsn is on a distinguished road
Baan: Infor Ln10.4 - DB: Oracle - OS: Unix
It works when use query.extend.from, query.extend.where keywords.

Reply With Quote
Sponsored Links

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
query.extension and refresh :(( Natasha Tools Development 4 5th September 2014 16:48 is not executed cazerpa Tools Development 6 12th October 2004 20:05

All times are GMT +2. The time now is 23:41.

©2001-2018 - -