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 the use of primary key?
what is a database lock ? : Sql dba
Is there a way to automate sql execution from the command-line, batch job or shell script?
What programs use sql?
Explain the uses of database trigger.
What is the purpose of normalization?
How do you select unique values in sql?
How does sql*loader handles newline characters in a record? : aql loader
What is sql profiling in oracle?
What are three advantages to using sql?
What is an index in sql with example?
How delete all records from table in sql?
How many unique keys can a table have?
How to change the order of columns in Oracle SQL Plus ?
Is oracle and sql same?