Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Find string in a string?? |
Sat, Mar 20 2021 8:15 PM | Permanent Link |
Ian Branch | Hi Team,
How do I find/test if a field called Status has its value contained in a string like 'CA;CO;CL'? IN won't work, it wants something like ('CA',CL','CO'). CONTAINS is no good. Regards & TIA, Ian |
Sat, Mar 20 2021 8:20 PM | Permanent Link |
Ian Branch | Yeah! Isn't always the way....
As soon as I raised the Question I came across Occurs(). Sigh! All good now. Thanks for looking. Ian |
Sun, Mar 21 2021 8:19 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
For future reference I use POS. Roy Lambert |
Sun, Mar 21 2021 3:45 PM | Permanent Link |
Ian Branch | Noted. I didn't get that far in the alphabet.
|
Mon, Mar 22 2021 3:22 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
Couple of things: Whilst I doubt you'd notice any speed difference with the length of string you're liable to be using, and unless its hitting loads of rows remember POS returns as soon as it finds a hit, OCCURS has to check out the full string every time Second whichever way you go, unless you can guarantee uniqueness of substrings in the string always append the separator to the row you're testing silly case test for 'co' in 'coa;cob;coc' would show true but test for 'co;' and it will return false I been bitten by that a few times. Roy Lambert |
Mon, Mar 22 2021 2:49 PM | Permanent Link |
Ian Branch | Hi Roy,
Noted. Fortunately they are all unique. Regards, Ian |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |