Skip to content

Instantly share code, notes, and snippets.

@stelf
Created April 11, 2017 21:01
Show Gist options
  • Save stelf/96a93cc4b0b2ceed1e260ab68e7b5181 to your computer and use it in GitHub Desktop.
Save stelf/96a93cc4b0b2ceed1e260ab68e7b5181 to your computer and use it in GitHub Desktop.
update VISIONR inmaintbl schema from 'false' to 'true'
UPDATE
visionr.pv_m_itm iout
SET
protocol_stock = (
select
child_object
from
visionr.pv_m_rel_1_n
where
property = (select id from visionr.pv_c_pro where code = 'protocol_stock' and objectdef = (
select
id
from
visionr.pv_c_objdef
where
code = 'item'
and
module = (select id from visionr.pv_c_mod where code = 'most')
))
AND
parent_object = iout.id
),
protocol_sale = (
select
child_object
from
visionr.pv_m_rel_1_n
where
property = (select id from visionr.pv_c_pro where code = 'protocol_sale' and objectdef = (
select
id
from
visionr.pv_c_objdef
where
code = 'item'
and
module = (select id from visionr.pv_c_mod where code = 'most')
))
AND
parent_object = iout.id
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment