postgresql7.1 update uv_card_base_note set base_note= 100, alum_view= :alum_view where community_id= :community_id insert into uv_card_base_note (community_id, base_note) values (:community_id, 100) select name_xcent from uv_card_xcent_note where ref_community_id = :community_id and name_xcent = :asig_alias insert into uv_card_xcent_note (ref_community_id, ref_basetype, name_xcent, xcent, allow_act, rvalor,np) values (:community_id, :asig_type, :asig_alias, :asig_percent, :asig_act, :asig_rvalor, :asig_np) select id_xcent from uv_card_xcent_note where ref_community_id = :community_id and name_xcent = :asig_alias and ref_basetype = :asig_type insert into uv_card_subtype_note (ref_community_id, name_subtype, ref_xcent) values (:community_id, :asig_alias, :id_xcent) update uv_card_xcent_note set ref_basetype= :asig_type, xcent= :asig_percent, name_xcent= :asig_alias, allow_act= :asig_act, rvalor= :asig_rvalor, np= :asig_np where id_xcent= :asig_id select id_subtype from uv_card_subtype_note where ref_xcent = :asig_id delete from uv_card_notes where ref_subtype= :del_i delete from uv_card_subtype_note where ref_xcent= :asig_id delete from uv_card_xcent_note where id_xcent= :asig_id select * from uv_card_basetype_note order by id_basetype select * from uv_card_xcent_note where ref_community_id = :community_id order by id_xcent select * from uv_card_xcent_note inner join uv_card_basetype_note on (uv_card_basetype_note.id_basetype = uv_card_xcent_note.ref_basetype) where uv_card_xcent_note.ref_community_id = :community_id order by uv_card_xcent_note.xcent desc select id_xcent from uv_card_xcent_note where ref_community_id = :community_id select * from uv_card_xcent_note where id_xcent = :asig_id select sum(uv_card_xcent_note.xcent) as total from uv_card_xcent_note where uv_card_xcent_note.ref_community_id = :community_id