Hi,
The script T-SQL you privided is good, but you can just use the dbcc inputbuffer(SPID#) only once you have identified the blocked process and blocked by process.
By running the command i mentioned, you may able to see what particular T-SQL that is about to run or running.
Cheers!
dev1.bohol