select

querycode,
queryname,
querytypeappquick,
querytypeappsearch,
querytypedatamanager,
querytypedefault,
querytypeglobalquick,
querytypeglobalsearch,
querytypemassupdate,
querytypemaster,
querytypemessage,
querytypeworkflow

from twistQuery

where 
  querycode like '%all%'
  
 
*******************************

update twistQuery set

querytypeappquick = 1,
querytypedefault = 1

where 
  querycode like '%all%'

*******************************

update twistQuery set

querytypeappquick = 1

where 
  querycode like '%deleted%'

********************************
update twistQuery set

querytypeappsearch = 1

where 
  querycode like '%quicksearch%'
  
********************************
update twistQuery set

querytypedatamanager = 1

where 
  querycode like '%datamanager%'
  
********************************
select

querycode,
queryname,
querytypeappquick,
querytypeappsearch,
querytypedatamanager,
querytypedefault,
querytypeglobalquick,
querytypeglobalsearch,
querytypemassupdate,
querytypemaster,
querytypemessage,
querytypeworkflow

from twistQuery

where 
  querytypedatamanager = false and 
  querytypeappquick = false and
	querytypeappsearch = false

********************************
update twistQuery

set querytypeappquick = true

where 
  querytypedatamanager = false and 
  querytypeappquick = false and
	querytypeappsearch = false
  

