Test: Strings

1

Please login or register to vote for this query.

(click on this box to dismiss)

Amateur Radio

Q&A for amateur radio enthusiasts

SELECT  TOP(200)
       Id [User Link],
       Reputation,
       Location

FROM   Users
        
    WHERE  LEN(Location) > 1 and

        (
         -- Try    goa
         --lower(Location) like lower('%##Location##%') -- anywhere in Location / not case sensitive
         -- UPPER(Location) like UPPER('%##Location##%') -- Same as lower  like  lower
         
         
         -- Try    Aisa  or  aisa
          Location like '%##Location##%'    -- anywhere in Location / case sensitive
         -- Location LIKE ##Location:string?asia## -- match entire string to Location / case sensitive
         
         
         -- Try a hard-coded example
         -- lower(Location) like ('goa%')  -- leading characters, any case, of the location
         -- lower(Location) like ('%goa')  -- trailing characters, any case, of the location
         
         
         -- Enter lower case search word only
         -- Try    goa
         -- lower(Location) like ('##Location##%')  -- leading characters, any case, of the location
         -- lower(Location) like ('%##Location##')  -- trailing characters, any case, of the location 
         
         
         -- In either upper or lower case
         --   , ON  
         --UPPER(RIGHT(RTRIM(Location), 4)) like UPPER('%##Location##%')
         
         --In either upper or lower case
         --   ,ON
         --UPPER(RIGHT(RTRIM(Location), 3)) like UPPER('%##Location##%')
         
        )
 
ORDER  BY location

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results