Jump to content
Sign in to follow this  
texan

Selecting certain records from an Array

Recommended Posts

Let's say I have a 2 dimensional array that contains 3 columns and thousands of rows. The three columns contain data for STATE, COUNTY and CITY and all the rows are every combination of this data in the US.

I am looking for some method of returning a new array that contains all the data that matches some subset of the main array. For instance, I want all the cities in NY so I would want the new array to countain all the rows where the STATE is equal to "NY".

I could easily right SQL to do this on a table but I am not seeing any easy method in Autoit. Any suggestions?

I have been looking at various _Array* functions but none seem to do this. _ArrayUnique is close.

Share this post


Link to post
Share on other sites

_ArraySearch + some code to fill the new array?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-10-10 - Version 1.5.2.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-30 - Version 1.6.2.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - Wiki

 

Share this post


Link to post
Share on other sites

The SQL UDF allows you to use SQL syntax to query information from the database. If the data resides a database, might as well just use the UDF.


Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...