MySQL Forums
Forum List  »  Triggers

calculated field
Posted by: John Heinze
Date: November 28, 2014 11:37AM

I have a field CID which is based on 3 other fields: AccountNum, Node, and VLAN. I would like to 'calculate' the CID field on insert and update. If AccountNum = 1000, Node = 02, and VLAN =300 then CID would be 1000-02-300. I have created a view which 'builds' the CID but haven't figured out how to insert the 'built' CID into a record.
Is it possible to use a trigger or is there a better method?

Options: ReplyQuote

Written By
calculated field
November 28, 2014 11:37AM
November 28, 2014 12:40PM
November 28, 2014 02:47PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.