Skip to content

Instantly share code, notes, and snippets.

@jimwhite
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimwhite/16b97866d1dec0f04640 to your computer and use it in GitHub Desktop.
Save jimwhite/16b97866d1dec0f04640 to your computer and use it in GitHub Desktop.
def dat = ['NCC_TEST': [1234, 1345, 1232, 1133, 1100], 'NCC_TEST2': [9999,8765, 4321]]
println """update tablename set IsEnriched = 999 where ${
dat.collect { name, serials ->
"(ServerName = '$name' and ServerSerial in (${ serials.join(', ') }))"
}.join(" or ")
}"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment