How do I work with the results of a SQL query or stored procedure? For example, what kinds of result-set formatting is supported so that I can get one or more values back and use those values in a later step? One specific thing I'm looking to do is a job that calls a stored procedure in a loop, with the condition of the loop being a value returned from the stored procedure (i.e. the stored procedure returns X, call it again if X is greater than Y (up to some limit to make sure it doesn't get stuck in an endless loop), but if X is less than Y, exit the job as "successful"). This is a simple example that only needs to return one variable, but what if I needed to return more than one? If this is discussed in the documentation, I couldn't find it, but please point me there if it is. A few examples of this kind of job would be nice, too.