Skip to content

Instantly share code, notes, and snippets.

@worstn8mare
Created October 7, 2019 05:18
Show Gist options
  • Save worstn8mare/a2de2482d701882eac7d79bbf9f8e5f4 to your computer and use it in GitHub Desktop.
Save worstn8mare/a2de2482d701882eac7d79bbf9f8e5f4 to your computer and use it in GitHub Desktop.
test.insert-bulk-and-itemcost
INSERT INTO edisonlamps.bulk_units (item_id, name, qty,uom_id, active, type, created_by, unit_code)
SELECT id, "roll", 5, 2, "Active", "base", 1, "roll"
FROM edisonlamps.items
WHERE inventory_types_id = 2 and uom_id = 4
INSERT INTO edisonlamps.itemcosts (item_id, itemcost, effective_date)
SELECT id, item_cost, NOW()
FROM edisonlamps.items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment