Skip to content

Instantly share code, notes, and snippets.

@gmgent
Created March 8, 2011 19:31
Show Gist options
  • Select an option

  • Save gmgent/860852 to your computer and use it in GitHub Desktop.

Select an option

Save gmgent/860852 to your computer and use it in GitHub Desktop.
UPDATE revplan_infos
AS ri SET
ri.retail_margin = (SELECT (ri.amount * partner_infos.retail_margin/100)
FROM partner_infos
WHERE ri.partner_id = partner_infos.partner_id)
WHERE revplan_id = 3
AND revplan_type = 'Plan'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment