I am new to SQL Server and have inherited a database from another developer.
I have a Stored Procedure that I'm trying to use in my vb.net program to fill a form with multiple datagrids.
The Stored Proc looks like this:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
ALTER PROCEDURE [dbo].[spGetAdjustmentDetail](@AdjustmentId uniqueidentifier)
(Id, AdjustmentHeaderId, AdjustmentDetailId,
TypeCode, MeasurementId, Value, Row)
A.Id, D.AdjustmentHeaderId, A.AdjustmentDetailId,
D.TypeCode, A.MeasurementId, A.Value, A.Row
FROM tAdjustment AS A
INNER JOIN tAdjustmentDetail AS D ON
A.AdjustmentDetailId=D.Id AND D.AdjustmentHeaderId=@AdjustmentId
I.Id AS InitId, I.Id AS DispId, I.AdjustmentHeaderId, I.AdjustmentDetailId, I.MeasurementId,
I.Value AS InitAmount, D.Value AS DispAmount
FROM tAdjustmentEx AS I
LEFT OUTER JOIN tAdjustmentEx AS D ON
WHERE I.TypeCode IN ('I', 'S')
ORDER BY I.Row
My question is how do I address the multiple select statements in the return values of this Stored Proc? The way this is written will it return all the values from each select? or just the first one?
Any help would be appreciated,