A few questions (Array, Lastval, Siblings) [message #193330] |
Fri, 15 September 2006 13:17 |
Xeneize
Messages: 6 Registered: September 2006
|
Junior Member |
|
|
My last three questions for now, thankz
1. Array as parameter of function
Is it possible to pass to a function as a parameter an array (of string, or integer, or any type) without
having to declare explicity a type for each one??
2. How can i obtain the lastval of a sequence?, something similar than namesequence.NEXTVAL but giving back teh lastval?
3. CONNECT BY:
- Is it possible to use distinct or Group by when using SIBLINGS to order the tree???
|
|
|
Re: A few questions (Array, Lastval, Siblings) [message #193547 is a reply to message #193330] |
Mon, 18 September 2006 03:29 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
1) Nope. All parameters passed into functions have to have a type, which must be declared somewhere. For packaged functions, the type can be declared in the same package if you like, but the type must be declared before you can pass a variable of that type into a function.
2) sequence_name.currval will return the last value you selected.
There is a column 'LAST_VALUE' in the USER_SEQUENCES view, but this will only show the value that will be returned next if the cache size for that sequence is 0. Otherwise, it will show the last cached value that was selected .
3) Don't know. Why don't you try and let us know.
|
|
|
|