Decker Newbie
Joined: 18 Dec 2003 Posts: 9
|
Posted: Wed Dec 31, 2003 5:47 am
Indexing in database variables |
Hi,
I have a standard database record variable, of the form
name1=value1
name2=value2
...
nameN=valueN
I see the variable as an ordered list of name=value items.
I want to retrieve a name=value pair (or just the key) by using an index. For example, to get the name2 key, I want a function that returns the key given the position. E.g key=%indexdb(@dbvar, 2);
I believe it should be possible to do so since the %iskey function returns a position:
Syntax: %iskey(rec,key)
returns the key number if the key exists in the record
But how do I do it? I could muck with #LOOPDB, but I hope there is a more efficient way of doing that.
Thanks for the help! |
|