This is the dirty way !!
You can try to make a select to "syscomments", but the trouble is that the code is split in rows.
So I use this select into SQL Advantage :
SELECT "#", text
FROM syscomments,
sysobjects
WHERE sysobjects.id = syscomments.id
AND type = "P"
AND uid = user_id()
ORDER by syscomments.id,
syscomments.colid2,
syscomments.colid
and then replace with regexp like this " \n# " all the split lines (I use Textpad).
Be carefull !!
You must know that may be there is some store that need extra code to create temp tables before create the store.