Jump to content
Sign in to follow this  
texan

Selecting certain records from an Array

Recommended Posts

texan

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
water

_ArraySearch + some code to fill the new array?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - 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
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
UEZ

You can use also SQL with AutoIt. Search the forum for plenty of examples.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
Mechaflash

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  

×