Baanboard.com

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

User login

Frontpage Sponsor

Main

Google search


Poll
How big is your Baan-DB (just Data AND Indexes)
0 - 200 GB
14%
200 - 500 GB
32%
500 - 800 GB
4%
800 - 1200 GB
4%
1200 - 1500 GB
11%
1500 - 2000 GB
14%
> 2000 GB
21%
Total votes: 28

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 8th November 2002, 21:47
ken bohnenkamp ken bohnenkamp is offline
Senior Member
 
Join Date: Jul 2002
Posts: 100
ken bohnenkamp is on a distinguished road
Baan: B40C C4 - DB: Informix - OS: Unix
Unhappy Query Extension

I have added a query extension to extend my where clause so that I only get a subset of records when zooming to another session. After the records are selected, I would like to order them by a date in descending order. Does anyone know how I can do this?
Reply With Quote
  #2  
Old 8th November 2002, 23:06
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,135
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
Yes you can add indexes to tables. Just go into Maintain table definitions(ttadv4120m000), click on indices and add the one you want. Next do a convert to runtime and then log off and back on.

From your other posts - it looks like you then need to go maintain the session in question click on change key and add the new index. Note that you may want to make this new index have a sort = 1 (start index). Just remember that whenever you start this session this will be the default index.

Good Luck!

Mark
Reply With Quote
  #3  
Old 6th November 2009, 13:24
kbabu1's Avatar
kbabu1 kbabu1 is offline
Member
 
Join Date: Sep 2003
Location: India, Mumbai
Posts: 46
kbabu1 is on a distinguished road
Baan: Baan 4 and 5, Infor ERP LN - DB: Oracle, SQL Server - OS: Windos 2000, Unix
Can we sort records in descending order when session is started?
__________________
-kbabu1
Reply With Quote
  #4  
Old 6th November 2009, 15:19
ks_ks_ ks_ks_ is offline
Senior Member
 
Join Date: Jan 2007
Posts: 141
ks_ks_ is on a distinguished road
Baan: Baan 5 - DB: Oracle 9i - OS: Win NT
yes we can.. use query.extend.where put the condition and ._index1 desc.. it works well
Reply With Quote
Sponsored Links
  #5  
Old 6th November 2009, 15:41
rberti's Avatar
rberti rberti is offline
Member
 
Join Date: Feb 2007
Location: São Paulo
Posts: 62
rberti is on a distinguished road
Baan: BaaN IV, Baan V, LN - DB: Oracle, Informix - OS: UNIX
is there a way to do it in baan4?
Reply With Quote
  #6  
Old 6th November 2009, 16:10
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,725
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Yes

Quote:
Originally Posted by rberti View Post
is there a way to do it in baan4?
Hello,

BaanERP Programmers Guide


query.extend.where(), query.extend.where.in.zoom()

--------------------------------------------------------------------------------

Syntax
void query.extend.where( string extension_string [, mode] )
void query.extend.where.in.zoom( string extension_string )

Description
Use this to construct a query extension for the WHERE clause of a database query. Use query.extend.where() for non-zoom sessions. Use query.extend.where.in.zoom() for defining query filters for zoom sessions.

Arguments
extension_string
A string containing the names of the fields to be included in the WHERE statement. Use commas [,] to separate the field names.

mode
This optional argument can have one of the following values:

EXTEND_OVERWRITE replaces any existing query extension
(this is the default mode)

EXTEND_APPEND appends this extension to the existing extension


Note
In BaanERP, this function replaces the predefined variable query.extension that was used in earlier versions of the software.

Context
You can use query.extend.where() in the before.program section of UI scripts and in the before.open.object() hook of DAL scripts. You can use query.extend.where.in.zoom() only in the selection.filter section of UI scripts.

Regards
__________________
//Bernd
Reply With Quote
  #7  
Old 6th November 2009, 17:25
rberti's Avatar
rberti rberti is offline
Member
 
Join Date: Feb 2007
Location: São Paulo
Posts: 62
rberti is on a distinguished road
Baan: BaaN IV, Baan V, LN - DB: Oracle, Informix - OS: UNIX
Hi bdittmar.
I use these functions a lot in LN, but in baan4 it don't work.
So I use the pred. variable query.extension to filter the main table query, but not to change the table's order or to sort in descending order.

So, the question: Is there a way to do it in baan4?
Reply With Quote
  #8  
Old 15th November 2009, 15:35
kbabu1's Avatar
kbabu1 kbabu1 is offline
Member
 
Join Date: Sep 2003
Location: India, Mumbai
Posts: 46
kbabu1 is on a distinguished road
Baan: Baan 4 and 5, Infor ERP LN - DB: Oracle, SQL Server - OS: Windos 2000, Unix
Thumbs down query.extend.where() doesn't work for ordering data...even in 5c

All,

Thanks for replying to my query.

I tried this in Baan 5c and it didn't work. We cannot specify 'order by' clause in query extensions.

If anyone tried this and if it worked then please let me know.

Thanks,
Regards
__________________
-kbabu1

Last edited by kbabu1 : 15th November 2009 at 15:45.
Reply With Quote
  #9  
Old 18th November 2009, 22:25
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,070
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Quote:
I tried this in Baan 5c and it didn't work. We cannot specify 'order by' clause in query extensions.
Try,

void query.extend.order( const string extension(), [ long mode ] )
Try with mode - 0, 1
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #10  
Old 28th November 2009, 11:36
kbabu1's Avatar
kbabu1 kbabu1 is offline
Member
 
Join Date: Sep 2003
Location: India, Mumbai
Posts: 46
kbabu1 is on a distinguished road
Baan: Baan 4 and 5, Infor ERP LN - DB: Oracle, SQL Server - OS: Windos 2000, Unix
Thumbs down tried both mode 0 and 1...it did not work.

tried both mode 0 and 1...it did not work.
__________________
-kbabu1
Reply With Quote
  #11  
Old 30th November 2009, 08:59
rahul.kolhe22's Avatar
rahul.kolhe22 rahul.kolhe22 is offline
Senior Member
 
Join Date: Apr 2008
Location: India
Posts: 168
rahul.kolhe22 is on a distinguished road
Baan: Baan IVc4, Infor ERP LN - DB: SQL 2005 - OS: Windows XP, UNIX
Hi,
Please try the following option. This works for me well on LN.
query.extend.order (<field name> [Sort Direction])
eg.
query.extend.order ("tccom100.abcd DESC")
here tccom100.abcd is just some field on which I have to do order by in descending order.

Regards
--Rahul
Reply With Quote
  #12  
Old 3rd December 2009, 15:34
kbabu1's Avatar
kbabu1 kbabu1 is offline
Member
 
Join Date: Sep 2003
Location: India, Mumbai
Posts: 46
kbabu1 is on a distinguished road
Baan: Baan 4 and 5, Infor ERP LN - DB: Oracle, SQL Server - OS: Windos 2000, Unix
I need some solution in Baan 5c

I need some solution in Baan 5c...
__________________
-kbabu1
Reply With Quote
  #13  
Old 17th December 2009, 15:05
Mario Mario is offline
Member
 
Join Date: May 2005
Location: Holland
Posts: 41
Mario will become famous soon enoughMario will become famous soon enough
Baan: all - DB: all - OS: all
Dear Rahul,
query.extend.order(...) is not listed in any program manual - or I can't find it - is this a hidden feature or they just forgot to 'share' this one. I only see query.extend.select/where/from.
Where did you find this option?

Best Regards, Mario
Reply With Quote
  #14  
Old 18th December 2009, 07:05
rahul.kolhe22's Avatar
rahul.kolhe22 rahul.kolhe22 is offline
Senior Member
 
Join Date: Apr 2008
Location: India
Posts: 168
rahul.kolhe22 is on a distinguished road
Baan: Baan IVc4, Infor ERP LN - DB: SQL 2005 - OS: Windows XP, UNIX
Hi Mario,
Even I could not find "query.extend.order" function in programers guide for LN.
I came to know about it from the following link:
http://www.baanboard.com/baanboard/s...49371#poststop

Regards,
--Rahul
Reply With Quote
  #15  
Old 10th March 2010, 07:56
catnesma catnesma is offline
Junior Member
 
Join Date: Oct 2009
Posts: 9
catnesma is on a distinguished road
Baan: LN6.1 FP3 - DB: SQL 2000 - OS: Windows 2003
query.extension

before.program:
query.extension = "tssoc200.osta = tssoc.osta.free" works fine but what if I have other conditions before I dispay my form
like ( tssoc200.osta = tssoc.osta.planned) and (tssoc200.csco <> " ") and others.
Reply With Quote
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
Select distinct records thru query extension?? arajasek Tools Development 5 25th August 2010 08:24
Query extension veerle Tools Development 3 8th July 2004 14:24
Group By in Query Extension edgar_luna_h Tools Development 1 16th January 2004 18:49
ERP: query extension spartacus Tools Development 2 2nd December 2002 11:17


All times are GMT +2. The time now is 08:06.


©2001-2018 - Baanboard.com - Baanforums.com