Original Message:
Sent: 11-18-2024 09:46
From: Sean Loos
Subject: Queries - Finding Multiple text
One example would be if you had records for East Alexander and West Alexander, you could query both with like "%ALEXANDER%".
------------------------------
Sean Loos
Mapping Solutions, LLC
Original Message:
Sent: 11-14-2024 19:45
From: Alexis Ha
Subject: Queries - Finding Multiple text
Thanks Sean,
That worked well.
With regards to this:
"Also note that with the % wildcard at the end the value would need to start with ALEXANDER and then can have anything after that. If you also want records where ALEXANDER is anywhere within the value you would use like "%ALEXANDER%".
"
Where would this come in handy? Do you have an example. Keen to try this out.
Alex
------------------------------
Alexis Ha
Lyall & Associates
Burlington MA
Original Message:
Sent: 11-14-2024 11:51
From: Sean Loos
Subject: Queries - Finding Multiple text
Alexis,
You would have to use:
wherer hydroname like "ALEXANDER%" OR hydroname like "ANVIL%"
You would have to keep adding OR statements for each value you want.
Also note that with the % wildcard at the end the value would need to start with ALEXANDER and then can have anything after that. If you also want records where ALEXANDER is anywhere within the value you would use like "%ALEXANDER%".
------------------------------
Sean Loos
Mapping Solutions, LLC
Original Message:
Sent: 11-13-2024 23:34
From: Alexis Ha
Subject: Queries - Finding Multiple text
Hi James,
The following worked: hydroname in ("ALEXANDER", "ANVIL")
However, is there a way to combine it for wildcards?
I've tried: hydroname like ("ALEXANDER%", "ANVIL%")
but it said syntax error and didnt work.
Alex
------------------------------
Alexis Ha
Lyall & Associates
Burlington MA
Original Message:
Sent: 11-13-2024 23:22
From: Alexis Ha
Subject: Queries - Finding Multiple text
I restarted my mapinfo, and now it works!
Thanks James
------------------------------
Alexis Ha
Lyall & Associates
Burlington MA
Original Message:
Sent: 11-13-2024 23:10
From: Alexis Ha
Subject: Queries - Finding Multiple text
HI James,
I've tried your methods, but was unable to make it work. So, I decided to use another data set but still unable to work.
I tried:
hydroname like "APPLETREE%" Or hydroname like "AYRES%"
And tried:
hydroname = "APPLETREE" Or hydroname = "AYRES%"
Both came back with an error: "No Records were selected"
Can you spot an error in my methods? or provide a different solution
Im using mapinfo pro version 15.0.3 release build 404
------------------------------
Alexis Ha
Lyall & Associates
Burlington MA
Original Message:
Sent: 11-13-2024 19:40
From: James Nolet
Subject: Queries - Finding Multiple text
Hi Alexis,
You can use the following expression in the Where clause:
hydroname in ("ALEXANDER", "ANVIL")
Another option is to use the following:
hydroname = "ALEXANDER" Or hydroname = "ANVIL"
(Note that the following is invalid: hydroname = "ALEXANDER" Or "ANVIL")
Wildcards are also possible, if using the "like" operator; e.g. to select all records where hydroname begins with "ALEX":
hydroname like "ALEX%"
I hope this helps.
------------------------------
James Nolet
GIS Manager
Caf Consulting
Mentone office, VIC, Australia
Original Message:
Sent: 11-13-2024 19:10
From: Alexis Ha
Subject: Queries - Finding Multiple text
Hi,
I want to be able to find multiple texts e.g. "ALEXANDER" AND "ANVIL" out of 7000 lines of record. But I am unable to figure out the syntax for this.
Anyone able to help? (Picture attached)
------------------------------
Alexis Ha
Lyall & Associates
Burlington MA
------------------------------