1

I'd like to be able to query an array (multi and single dimensional ) with something like SQL. Is there a way to do this?

It just seems extraordinarily wasteful to step through it one record at a time.

3
  • Perhaps an array is the wrong data structure to be using. What is your use case? Commented Jan 21, 2010 at 20:46
  • thanks...see comment to Dana's answer below for more info. Commented Jan 21, 2010 at 21:16
  • 2
    A disconnected recordset might suit: stackoverflow.com/questions/268648/… Commented Jan 21, 2010 at 21:30

2 Answers 2

2

Nope. Do you wasteful in terms of having to write the loop, or performance wise? I'd expect heaping a layer of abstraction over the array would hinder performance.

If you need to search your arrays in something other than linear time (ie., one at a time), you'll need to organize them so that you can so a binary search over them (or any number of other algorithms).

Sign up to request clarification or add additional context in comments.

1 Comment

Rats....I come from a DB background and arrays look so much like a db that I was hoping there was something out there.
2

A disconnected recordset might suit: How do I sort arrays using vbscript?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.