I've joined several large tables into 1 table that is updated nightly. There must be bad data in the table because I received this error last night:
Server: Msg 614, Level 18, State 3, Line 8
A row on page 774351 was accessed that has an illegal length of 0 in database 'THWG'.
How do you determine which row in which has the invalid length?
FROM OURWAY2.THWG.dbo.oelin_r oel
LEFT JOIN OURWAY2.THWG.dbo.oehdr_r oeh ON oeh.ord_ctrl_num = oel.ord_ctrl_num
LEFT JOIN OURWAY2.THWG.dbo.xoehdr_r xoeh ON xoeh.ord_ctrl_num = oel.ord_ctrl_num
LEFT JOIN OURWAY2.THWG.dbo.xoelin_r xoel ON xoel.ord_ctrl_num = oel.ord_ctrl_num AND
xoel.sequence_id = oel.sequence_id
WHERE oeh.category_code = 'SAMPLE' AND
oeh.status_code = 'CLOSED' AND
xoel.shipment_status_time BETWEEN
@begDate AND @endDate
Server: Msg 614, Level 18, State 3, Line 8
A row on page 774351 was accessed that has an illegal length of 0 in database 'THWG'.
How do you determine which row in which has the invalid length?
FROM OURWAY2.THWG.dbo.oelin_r oel
LEFT JOIN OURWAY2.THWG.dbo.oehdr_r oeh ON oeh.ord_ctrl_num = oel.ord_ctrl_num
LEFT JOIN OURWAY2.THWG.dbo.xoehdr_r xoeh ON xoeh.ord_ctrl_num = oel.ord_ctrl_num
LEFT JOIN OURWAY2.THWG.dbo.xoelin_r xoel ON xoel.ord_ctrl_num = oel.ord_ctrl_num AND
xoel.sequence_id = oel.sequence_id
WHERE oeh.category_code = 'SAMPLE' AND
oeh.status_code = 'CLOSED' AND
xoel.shipment_status_time BETWEEN
@begDate AND @endDate