on 10-29-2015 3:45 PM
Hi I have a table like below. I need to make the active=false for the text that has 'AA' using update impex by keeping batchmode=true
sample SQL update query: UPDATE table_name set active=false where text like '%AA%'
__________________________
|PK | ACTIVE | TEXT |
|_________________________|
| 1 | true | BBAABB |
| 2 | false | BBCCBB |
| 3 | true | BBAABB |
___________________________
You can't do this with impex because batchmode=true
expects you to set unique columns that will match exactly. You'd be better off doing it with a small Groovy script in the administration console
e.g.
flexibleSearchService.search("select {pk} from {mytype} where {text} like '%AA%'").result.each {
it.active = false
modelService.save(it)
}
(don't forget to click the ROLLBACK button to change to COMMIT or your changes won't be persisted!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.