Revision 6957
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/admin/upgrade/UpgradeNodeDataDatetime.java | ||
---|---|---|
123 | 123 |
String nodedata = null; |
124 | 124 |
int count = 0; |
125 | 125 |
|
126 |
// select the nodes that are not null |
|
126 |
// select the nodes that are not null and look like dates
|
|
127 | 127 |
sqlStatement = conn .createStatement(); |
128 | 128 |
rset = sqlStatement.executeQuery( |
129 | 129 |
"SELECT DISTINCT NODEID, NODEDATA " |
130 |
+ "FROM " + tableName + " WHERE " |
|
131 |
+ "nodedata IS NOT NULL " |
|
130 |
+ "FROM " + tableName |
|
131 |
+ " WHERE nodedata IS NOT NULL " |
|
132 |
+ " AND nodedata LIKE '____-__-__%' " |
|
132 | 133 |
); |
133 | 134 |
|
134 | 135 |
count = 0; |
Also available in: Unified diff
only attempt to update date-like nodedata values.