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
18%
200 - 500 GB
28%
500 - 800 GB
3%
800 - 1200 GB
7%
1200 - 1500 GB
7%
1500 - 2000 GB
13%
> 2000 GB
24%
Total votes: 71

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 9th August 2019, 16:11
RavCOder's Avatar
RavCOder RavCOder is offline
Junior Member
 
Join Date: Jul 2019
Posts: 20
RavCOder is on a distinguished road
Baan: 10.3 - DB: SQL Server - OS: Windows
Smile Sql query sum
Baan: Other/Unknown
C/S: None/Unknown

Hi,

I declared this function in program section in a script ( General library):

Code:
function sum.quantity(){
select tdsls400.item, tccom100.bpid
from tdsls400, tccom100

selectdo

db.set.to.default(ttdsls400)
db.set.to.default(ttccom100)

(select sum(tdsls400.qoor)
where tdsls400.item > 0)

endselect

}
In the declaration I put tables (tdsls400,tdsls401,tccom100 and tdsls900)
My objctive is to sum quantity for each article selected by id (business partner), and insert the result in field created in other table (tdsls900).

Regards,

---RavCoder----

Last edited by mark_h : 12th August 2019 at 02:46. Reason: code tags for readability
Reply With Quote
  #2  
Old 9th August 2019, 22:19
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,790
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox Tools 10.7 - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
Purchase statistic ?

Hello,

this requirement can be solved with the LN purchise/sales statistics.

Purchised/Sold quantity by business partner and item per period or item per period a.s.o.
(tdpst and tdsst)

Or is there any other reason to do it with an own developed session ?

Regards
__________________
//Bernd

Last edited by bdittmar : 10th August 2019 at 18:26. Reason: Also sales
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
SQL Query for SUM king1980 Tools Development 4 3rd April 2019 08:59
sql query srikarthy Tools Development 6 25th August 2010 09:46
Strange error while importing tables: Can not create index 9999 eppesuiG Tools Administration & Installation 8 17th March 2008 04:35
Sum by year in Baan SQL Query TAAtic Tools Administration & Installation 1 16th November 2002 01:49


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


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