wgnhs / lslc-web-app

Web Application for the viewing the WGNHS Lake Superior Legacy Collection
https://wgnhs.github.io/lslc-web-app/
1 stars 0 forks source link

Match up inputs to SQL Queries #7

Closed cmrRose closed 7 years ago

cmrRose commented 7 years ago

List of example SQL queries:

cmrRose commented 7 years ago

@swalljasper Here's an example of a case-insensitive way to query for a string value:

upper(RockType) LIKE '%CHERT%'

cmrRose commented 7 years ago

@swalljasper or a better option may be

query.where ="Upper(rockType) like '%" + rockTypeInput.toUpperCase() +"%'";

from https://geonet.esri.com/thread/33068#

I just tried query.where ="Upper(rockType) like '%" + "CHERT" +"%'"; which seems to work just fine.