Ticket History Madness

What started as a simple (?!) task to add two new fields to our t_tck_hist table, has taken an ugly turn.  The LP_UPDATE_TKT_HIST procedure is nearly unreadable spaghetti.  I requested and recieved a fresh copy.  It looks nearly the same as the spaghetti, with slightly better formatting.

Has anyone re-written their ticket history updating procedure to be more clean, compact, readable, and hopefully eliminated the cursors?

If I just have a query to pull all ticket history for a season, I can work with that.  The fields I need are:

customer_no
sale_type
performance_dt
matinee_or_evening
tck_amt
tck_type
price_type
num_seats
performance_name
location
season
mos_category
mos
order_dt

Thanks!

 

Parents
  • Hi David,

    Good day.

    results are tighten up with methods.

    The fields you want to have most likely are decided by the methods you are using.

    So if you want the same fields, I think maybe you have to take spaghetti.

    like location field, you have to use a spaghetti way to create it.

    but the question is why you need such a field?

    So I attched some code to create your own sales detail table,then you can make your own sandwich.

     

    have fun.

    Ben

     



    [edited by: Ben Gu at 9:35 PM (GMT -6) on 5 Oct 2009]
Reply
  • Hi David,

    Good day.

    results are tighten up with methods.

    The fields you want to have most likely are decided by the methods you are using.

    So if you want the same fields, I think maybe you have to take spaghetti.

    like location field, you have to use a spaghetti way to create it.

    but the question is why you need such a field?

    So I attched some code to create your own sales detail table,then you can make your own sandwich.

     

    have fun.

    Ben

     



    [edited by: Ben Gu at 9:35 PM (GMT -6) on 5 Oct 2009]
Children
No Data