lundi 18 septembre 2017

How to use IF Condition for the output of an stored procedure

I have output from stored procedure(which has 2 rows and 3 columns) now I have to check the value(from 2nd row, 3rd column) from that output is greater than some number say 1000, so that I can proceed with other function after that if condition is true.

Example: EXEC sp_helpdb MyDB --> this is My Stored procedure query to check the log size of the database.Output will be in table format in which one of the column will have log size. Now if the log size value is greater than some number say 800MB, I need to proceed with other operation. So how to check whether the size of the file is more/less than 800MB

Aucun commentaire:

Enregistrer un commentaire