Revision 1332
Added by Jing Tao about 22 years ago
src/edu/ucsb/nceas/metacat/QuerySpecification.java | ||
---|---|---|
1013 | 1013 |
} |
1014 | 1014 |
try { |
1015 | 1015 |
// it is number; numeric comparison |
1016 |
// but we need to make sure there is no string in node data |
|
1017 |
String getRidOfString = " AND UPPER(nodedata) = LOWER(nodedata)" + |
|
1018 |
" AND LTRIM(nodedata) != ' ' " + |
|
1019 |
" AND nodedata IS NOT NULL "; |
|
1016 | 1020 |
searchexpr = nodedataterm + " " + oper + " " + |
1017 |
new Double(casevalue) + " "; |
|
1021 |
new Double(casevalue) + " "+getRidOfString;
|
|
1018 | 1022 |
} catch (NumberFormatException nfe) { |
1019 | 1023 |
// these are characters; character comparison |
1020 | 1024 |
searchexpr = nodedataterm + " " + oper + " '" + casevalue + "' "; |
Also available in: Unified diff
Add a piece of query to get rid of invalid number in nodedata.