Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
19%
200 - 500 GB
28%
500 - 800 GB
2%
800 - 1200 GB
7%
1200 - 1500 GB
7%
1500 - 2000 GB
12%
> 2000 GB
24%
Total votes: 83

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
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 Main.table.io: after.read

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

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

before.program:

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
main.table.io:
after.read:
select tabB.F3 from tabB
where tabB.F2=:tabA.F2
selectdo
if tabB.F3 <> const1 then
skip.io("")
endif
endselect

How correctly to design query.extension in section "before.program"?
Reply With Quote
  #2  
Old 21st March 2003, 08:41
morpheus's Avatar
morpheus morpheus is offline
Guru
 
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
Andy,
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
  #3  
Old 21st March 2003, 15:51
evesely's Avatar
evesely evesely is offline
Guru
 
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.
Code:
query.extension = "exists (select tdsls040.cotp 
			from tdsls040 
			where tdsls040._index1 = {tdsls045.orno}
			and tdsls040.cotp = ""123"")"
Reply With Quote
  #4  
Old 21st March 2003, 16:14
Dikkie Dik's Avatar
Dikkie Dik Dikkie Dik is offline
Guru
 
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:

query.extend.select()
query.extend.select.from.in.zoom()
query.extend.from()
query.extend.from.in.zoom()
query.extend.where()
query.extend.where.in.zoom()

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,
Dick
__________________
BTW: this post has been made on my personal view. My employer might not share my point of view.
Reply With Quote
  #5  
Old 13th January 2020, 09:55
srkndnsn srkndnsn is offline
Member
 
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.
Thanks

Best
Serkan
Reply With Quote
Sponsored Links
Reply


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
main.table.io: 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 - Baanboard.com - Baanforums.com