How to return more than one value from a function?
Answer Posted / ravivarman_r
Public Type Income
Wages As Currency
Dividends As Currency
Other As Currency
Total As Currency
End TypeYou can now use this structure as the return
type for a function. In a real situation, the function
would look up your database tables to get the values, but
the return values would be assigned like this:
Function GetIncome() As Income
GetIncome.Wages = 950
GetIncome.Dividends = 570
GetIncome.Other = 52
GetIncome.Total = GetIncome.Wages +
GetIncome.Dividends + GetIncome.Other
End FunctionTo use the function, you could type into
the Immediate Window:
GetIncome().Wages
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
what is oracle database ? : Sql dba
What are the different schemas objects that can be created using pl/sql?
Why stored procedure is faster than query?
how to write date and time literals? : Sql dba
What is flag in sql?
Write a sql query to convert all character to uppercase after hypen.
In what condition is it good to disable a trigger?
What is sql key?
Which certification is best for sql?
How to Execute a Package in PL/SQL.?
What are inner and outer joins examples of both?
What is snowflake sql?
Which constraints we can use while creating database in sql?
How can you get sql*loader to commit only at the end of the load file? : aql loader
What is triggering circuit?