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
29%
500 - 800 GB
3%
800 - 1200 GB
7%
1200 - 1500 GB
7%
1500 - 2000 GB
13%
> 2000 GB
22%
Total votes: 68

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 22nd March 2019, 08:17
Rinkashiki Rinkashiki is offline
Junior Member
 
Join Date: Apr 2013
Posts: 29
Rinkashiki is on a distinguished road
Baan: 10.4 - DB: oracle - OS: windows 7
sql.parse round
Baan: Other/Unknown
C/S: None/Unknown

hello. there is an inquiry:
sql1 = sql.parse(
" select sum(maho):1 from ("
& " select round((tisfc010.maho/tisfc010.qpli),4) as maho "
& " from tisfc010 "
& " where tisfc010._index1 = {:3} and "
& " tisfc010.qpli <> 0 and "
& " tisfc010.cwoc like :4 & '.*' and "
& " tisfc010.cwoc not like '.*' & 'B' & '.*' "
& " ) aa"
)
sql.select.bind(sql1, 1, SUM_1)
sql.where.bind (sql1, 3, orno)
sql.where.bind (sql1, 4, mnwc_1_3)
e = sql.exec(sql1)
sql.fetch(sql1)
sql.break(sql1)
sql.close(sql1)
gives out a mistake. and it is necessary to round to summation. HELP!
Reply With Quote
  #2  
Old 22nd March 2019, 12:54
Ajesh's Avatar
Ajesh Ajesh is offline
Guru
 
Join Date: Feb 2009
Posts: 621
Ajesh is on a distinguished road
Baan: LN 10.4 - DB: Oracle - OS: HP-Unix
Have never used it like this.. Why don't you divide and then take round and then take sum individually than directly in the SQL query, like below

Code:
on case ( sql.fetch(sql) )
                case eendfile:
                        break
                case 0:
                        print_info(ppmod090.fld1, total)
                        continue
                default:                                | error
                        message("Error %d occurred", db.error)
                endcase
                break
Reply With Quote
  #3  
Old 23rd March 2019, 05:09
Rinkashiki Rinkashiki is offline
Junior Member
 
Join Date: Apr 2013
Posts: 29
Rinkashiki is on a distinguished road
Baan: 10.4 - DB: oracle - OS: windows 7
it everything is clear. but when operations 200 by request, so it summarized at once everything. and so on each operation rounded, then again came. if it within all orders, long turns out.
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
round off value smusba Tools Development 1 30th January 2011 11:13
Round Off a table field becks22 Tools Development 2 3rd December 2010 05:44
How to round off Double datatype to 8 decimal place bluetenders Tools Development 9 2nd June 2010 15:24
Round off problem mr_suleyman Tools Development 4 18th October 2004 15:33


All times are GMT +2. The time now is 14:48.


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