DROP PROCEDURE IF EXISTS uspGetBankszamlaIgenylesData
GO

CREATE PROCEDURE uspGetBankszamlaIgenylesData
   @pTanevId int
  ,@pTanuloId int

AS
BEGIN
  SET NOCOUNT ON;

  SELECT
     fh.C_EGYEDIAZONOSITO AS EgyediAzonosito
    ,fh.C_SZULETESIDATUM AS SzuletesiIdo
    ,dk.C_BANKSZAMLASZAM AS Bankszamlaszam
  FROM T_TANULO_OSSZES dk
    INNER JOIN T_FELHASZNALO_OSSZES fh ON fh.ID = dk.ID AND fh.C_TANEVID = dk.C_ALTANEVID AND fh.TOROLT = 'F'
  WHERE dk.ID = @pTanuloId
    AND dk.C_ALTANEVID = @pTanevId
    AND dk.TOROLT = 'F'
END

GO

