Baanboard.com

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

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd July 2017, 15:21
kingsley143's Avatar
kingsley143 kingsley143 is offline
Member
 
Join Date: Feb 2008
Location: INDIA
Posts: 34
kingsley143 is on a distinguished road
Baan: Baan LN 6.1 - DB: Microsoft SQL server 2000 - OS: windows server 2003
refers to using or condition

Moved to correct forum. Tools Development.

If you just want to check if the record exists in the two tables, a better option will be to create two different functions to check if the record exists.

e.g.

Code:
function read.main.table()
{
    select tisfc001.*
    from tisfc001
    where tisfc001._index1 inrange {:pdno.f} and {:pdno.t}
    and    tisfc001.cprj inrange {:cprj.f} and {:cprj.t}
    and     tisfc001.cldt < :prdt.f
    order by tisfc001._index1,tisfc001.mitm asc
    selectdo
                if record.exists.in.ticst001() then
                            do this...
                endif
                ....similar function for ticst002...
    endselect

}

function domain tcbool record.exists.in.ticst001()
{
           select ticst001.*
           from ticst001
           where ticst001._index1 = :tisfc001.pdno
           as set with 1 rows
           selectdo
                       return(true)
           endselect
           return(false)
}

Last edited by bhushanchanda : 3rd July 2017 at 16:35. Reason: added code tags
Reply With Quote
Sponsored Links
  #2  
Old 3rd July 2017, 16:41
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,320
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Moved to correct forum. Tools Development.

If you just want to check if the record exists in the two tables, a better option will be to create two different functions to check if the record exists.

e.g.

Code:
function read.main.table()
{
    select tisfc001.*
    from tisfc001
    where tisfc001._index1 inrange {:pdno.f} and {:pdno.t}
    and    tisfc001.cprj inrange {:cprj.f} and {:cprj.t}
    and     tisfc001.cldt < :prdt.f
    order by tisfc001._index1,tisfc001.mitm asc
    selectdo
                if record.exists.in.ticst001() then
                            do this...
                endif
                ....similar function for ticst002...
    endselect

}

function domain tcbool record.exists.in.ticst001()
{
           select ticst001.*
           from ticst001
           where ticst001._index1 = :tisfc001.pdno
           as set with 1 rows
           selectdo
                       return(true)
           endselect
           return(false)
}
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
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
Exchange condition issue Neal Matthews Tools Development 7 14th October 2008 17:43
Refers to becks22 Tools Development 4 15th September 2008 16:08
How to create a select statement for the following ltannous Tools Development 8 1st March 2004 08:53
select statement in script option ltannous Tools Development 4 17th February 2004 21:37
report script problem ltannous Tools Development 15 8th November 2002 17:07


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


©2001-2017 - Baanboard.com - Baanforums.com