Search code examples
sqldatabasesybasesap-ase

Query the result of a system procedure of a Sybase-ASE 15.7 database


Looking at the system procedure sp_helpartition, it returns a resultset with the following columns:

  1. owner
  2. name
  3. partitions
  4. partition_type

I am looking for a way to query the results of sp_helpartition, something like:

SELECT name FROM {RESULT OF sp_helpartition} WHERE partition_type = 'value'


Solution

  • A little bit of googling got me this piece of code, so you can easily extend it with your own condition. I don't have any other idea how to manipulate the result of sp_helpartition within sql.