 category proc descripciu8c3b3n descripciu8c3b3n descripciu8c3b3n copia lau800 informaciu8c3b3n deu800 unu800 presupuesto seleccionado au800 otro nuevo. composiciu8c3b3n composiciu8c3b3n composiciu8c3b3n tabla vidquoten1 tabla vidquoten2 tabla vidquoten3 cu8c3b3digo cu8c3b3digo cu8c3b3digo -- -------------------------------------------------------------------------------- -- routine ddlu800 -- note comments before andu800 after theu800 routine body will notu800 beu800 stored byu800 theu800 server -- -------------------------------------------------------------------------------- delimiter create definer sas_admin procedure copiapresupuesto inu800 pvidquoteid intu800 5u800 begin -- ------------------------------------------------------ -- insert from parameter quoteid into itself -- ------------------------------------------------------ insert into vidquoten1 vidquoteid vidquoteobra vidquotecliente vidquotefecha vidquotefechaest vidquoteestado vidquoteacom vidquotemedcheck select null vidquoten1 . vidquoteobra vidquoten1 . vidquotecliente vidquoten1 . vidquotefecha vidquoten1 . vidquotefechaest vidquoten1 . vidquoteestado vidquoten1 . vidquoteacom vidquoten1 . vidquotemedcheck from vidquoten1 where vidquoten1 . vidquoteid pvidquoteid; -- ------------------------------------------------------ -- take idu800 generated byu800 aiu800 -- ------------------------------------------------------ setu800 npru800 last_insert_id ; -- ------------------------------------------------------ -- insert from parameter quoteid into itself with npru800 -- ------------------------------------------------------ insert into fzggestion . vidquoten2 vidquoteid vidquoteitem vidquotepredid vidquoteprodid vidquoteprodcantidad vidquoteancho vidquotealto vidquoteprecio vidquotedetalle select npru800 vidquoten2 . vidquoteitem vidquoten2 . vidquotepredid vidquoten2 . vidquoteprodid vidquoten2 . vidquoteprodcantidad vidquoten2 . vidquoteancho vidquoten2 . vidquotealto vidquoten2 . vidquoteprecio vidquoten2 . vidquotedetalle from vidquoten2 where vidquoten2 . vidquoteid pvidquoteid; -- ------------------------------------------------------ -- insert from parameter quoteid into itself with npru800 -- ------------------------------------------------------ insert into vidquoten3 vidquoteid vidquoteitem vidquoteprodid vidquoteelementoid vidquotecomposicid vidquoteprodcantidad vidquoteancho vidquotealto vidquoteprecio vidquotepreciop vidquoteincluyedet select npru800 vidquoten3 . vidquoteitem vidquoten3 . vidquoteprodid vidquoten3 . vidquoteelementoid vidquoten3 . vidquotecomposicid vidquoten3 . vidquoteprodcantidad vidquoten3 . vidquoteancho vidquoten3 . vidquotealto vidquoten3 . vidquoteprecio vidquoten3 . vidquotepreciop vidquoten3 . vidquoteincluyedet from fzggestion . vidquoten3 where vidquoten3 . vidquoteid pvidquoteid; endu800 bitu8c3a1cora bitu8c3a1cora bitu8c3a1cora 20120409 alta para form presupuestou82ev1u800u82e0u800 delimiter create procedure copiapresupuesto inu800 pvidquoteid intu800 5u800 begin insert into vidquoten1 vidquoteid vidquoteobra vidquotecliente vidquotefecha vidquotevalidez vidquotefechaest vidquoteestado vidquoteacom select null vidquoten1 . vidquoteobra vidquoten1 . vidquotecliente vidquoten1 . vidquotefecha vidquoten1 . vidquotevalidez vidquoten1 . vidquotefechaest vidquoten1 . vidquoteestado vidquoten1 . vidquoteacom from fzggestion . vidquoten1 where vidquoten1 . vidquoteid pvidquoteid; setu800 npru800 last_insert_id ; insert into fzggestion . vidquoten2 vidquoteid vidquotelpre vidquoteitem vidquoteprodid vidquoteprodcantidad vidquoteancho vidquotealto vidquoteprecio vidquotedetalle select npru800 vidquoten2 . vidquotelpre vidquoten2 . vidquoteitem vidquoten2 . vidquoteprodid vidquoten2 . vidquoteprodcantidad vidquoten2 . vidquoteancho vidquoten2 . vidquotealto vidquoten2 . vidquoteprecio vidquoten2 . vidquotedetalle from fzggestion . vidquoten2 where vidquoten2 . vidquoteid pvidquoteid; insert into fzggestion . vidquoten3 vidquoteid vidquotelpre vidquoteitem vidquoteprodid vidquoteprodcantidad vidquoteancho vidquotealto vidquoteelementoid vidquoteprecio vidquotepreciop vidquoteincluyedet select npru800 vidquoten3 . vidquotelpre vidquoten3 . vidquoteitem vidquoten3 . vidquoteprodid vidquoten3 . vidquoteprodcantidad vidquoten3 . vidquoteancho vidquoten3 . vidquotealto vidquoten3 . vidquoteelementoid vidquoten3 . vidquoteprecio vidquoten3 . vidquotepreciop vidquoten3 . vidquoteincluyedet from fzggestion . vidquoten3 where vidquoten3 . vidquoteid pvidquoteid; insert into fzggestion . vidquoten4 vidquoteid vidquoteitem vidquoteprodid vidquoteelementoid vidquotevalorid vidquotevtipo vidquotevnecesario vidquoteventero vidquotevdecimal vidquotevtexto select npru800 vidquoten4 . vidquoteitem vidquoten4 . vidquoteprodid vidquoten4 . vidquoteelementoid vidquoten4 . vidquotevalorid vidquoten4 . vidquotevtipo vidquoten4 . vidquotevnecesario vidquoten4 . vidquoteventero vidquoten4 . vidquotevdecimal vidquoten4 . vidquotevtexto from fzggestion . vidquoten4 where vidquoten4 . vidquoteid pvidquoteid; endu800 20120925 actualizaciu8c3b3n deu800 losu800 atributos au800 utilizar yu800 eliminaciu8c3b3n provisoria deu800 lau800 informaciu8c3b3n deu800 tabla vidquoten4 usou800 usou800 usou800 form presupuesto macro presupuestocopia 