I am a novice in Sybase, working on a project and for some validations I need to know the size of the resultset in MBs for a given select query. These validations have to be done at run-time so any help will really be appreciated. Thanks in advance!

(I had thought of 2 ways of doing the above initially: 1. Form a temp table from the resultset and then find size of the temp table. But this doesnt solve the purpose because if the space is going to be high, system will crash even then right when the temp table is created .
2. Find the size of 1 row by summing up size of each coloumn and then multiply it with count(*). But again I have more than 5000 tables and some of them with more than 500 coloumns.)