![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello! I work with "IBM DB 2 Universal Database for Windows NT" Version 6. I want to create Function, which are using in a Queries. I don't want to use external function. I want to create a function, which returns the age of a person. The parameters of the function or procedure are two variables (Type is Date). The type of the value, who gives the function back is long. I try it with these code-lines: Create function age(Value1 Date, Value2 Date) Returns long return Year(Value2-Value1); These lines produce mistakes. I hope someone can understand me and can help me. SQL Functions were introduced in DB2 UDB V7 for LUW. Se the answre is: |
![]() |
| Thread Tools | |
| Display Modes | |
| |