What is this exception?
Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "pkt.orderno" could not be bound.
The executed sql query table alias is not correctly used to fetch the table column data.
Find the table alias name used in select statement and correct the alias name. In this error the table alias is 'pkt' and the column referred is orderno. In my query the table alias was 'pks' not 'pkt', hence the error.