REETA1967
27th January 2003, 17:18
hi,
1. how to write the following sql in Baan
select decode(dmoes200.dlty,'P','Part','F','Full')
from dmoes200
2. choice.cont.process:
on.choice:
what is the meaning of above main section / subsetion
bye
evertsen
27th January 2003, 19:28
Originally posted by REETA1967
2. choice.cont.process:
on.choice:
what is the meaning of above main section / subsetion
choice.<standard command>:
The subsections associated with this main section are executed for the specified command. You can enable standard commands and specify form commands from the session Sessions(ttadv2500m000).
on.choice:
The actions programmed in this subsection are executed when the specified command is activated. These actions are executed instead of the standard action associated with the command.
Actions in this section usually apply when you hit the Continue or Print button in a session.
evesely
27th January 2003, 20:12
In Baan, you cannot explicitly "decode" results in the select clause. You would need to do something like a CASE statement in the "SELECTDO" clause. For example:
select dmoes200.dlty
from dmoes200
selectdo
on case dmoes200.dlty
case "P":
dummy.var = "Pass"
break
case "F":
dummy.var = "Fail"
break
endcase
endselect
Obviously, there are only two choices here, so a CASE might be overkill. I hope the idea is clear, however.
NPRao
27th January 2003, 20:13
Reeta,
Please refer to the Baan SQL (http://www.baanboard.com/programmers_manual_baanerp_help_functions_database_handling_baan_sql) to learn more about BaaN SQL programming structure.
select decode(dmoes200.dlty,'P','Part','F','Full')
from dmoes200
I dont think there is an equivalent option to Oracle-decode in BaaN SQL. So you have to use nested "if" or "case" statements in the selectdo.
REETA1967
28th January 2003, 10:45
thanx for giving the reply with an example
1.i would like to know the size of a variable
like length(dmoes201.clno)
2. how to use import and export function with an example
and where it should come in the program script.
if i want generate a session which generate the auto lot no.
and can take that value through display session . if i have selected
that record it should come to the receipt of material
hope for the fast respond
bye