Try to add the 'on' condition after join t_ticket_history
.
i have a stored procedure that is complaining about a group by clause but i can see nothing wrong with it
Anonymous
Would someone PLEASE tell me what is wrong with this?
select d.customer_no, e.sort_name, d.order_no, d.perf_no, d.season_desc, h.prod_no, b.seat_no, g.description 'section', f.seat_row, f.seat_num, a.sli_no, a.last_event, b.event_code, c.description 'event_code_desc'
into #raw
from #last_activity a
join T_ORDER_SEAT_HIST b on a.last_event = b.id
join TR_EVENT_CODE c on b.event_code = c.id
join LV_ALL_TICKET_SALES_V12 d on a.sli_no = d.sli_no
join t_customer e on d.customer_no = e.customer_no
join t_seat f on d.seat_no = f.seat_no
join tr_section g on f.section = g.id
join t_production h on h.prod_no=t_ticket_history.prod_no
join t_ticket_history
group by d.customer_no, e.sort_name, d.order_no, d.perf_no, d.season_desc
, h.prod_no, b.seat_no, g.description, f.seat_row, f.seat_num, a.sli_no, a.last_event, b.event_code, c.description
2 answers
Sort by: Most helpful
-
Viorel 114.7K Reputation points
2024-01-19T20:01:06.78+00:00 -
Ken Kam Hung, Lin 91 Reputation points
2024-01-22T01:57:54.3833333+00:00 "join t_ticket_history" is missing which columns to map between the result and t_ticket_history table.