SELECT GroupTypeID, GroupType, DOC_ID, KreditorNummer, KreditorName_Lang, KreditorName, RechnungNr, Referenz, Nettobetrag, Bruttobetrag, Zahlungsziel, Mandant, [Mandant Name], Kostenstelle, [Erhalten wann], Belegdatum, FG_Email, FG_Freigabe, FG_Wann, WHO, [WHEN], DELEGATION FROM VWCUST_RPTPM_UNION WHERE (DOC_ID = @DocID) AND (LEN(RechnungNr) > 0) SELECT FG_TYP, DocID, Email, Freigabe, Wann FROM VWCUST_STAMP WHERE (DocID = @DocID) SELECT DocID, STATE, WHO, CREATED_WHEN FROM dbo.FNCUST_PM_GET_RPT_STAMP_FOR_DocID(@DocID) AS FNCUST_PM_GET_RPT_STAMP_FOR_DocID_1 SELECT FG_TYP, DocID, Email, Freigabe, Wann FROM VWCUST_STAMP WHERE (DocID = @DocID) SELECT * FROM [dbo].FNCUST_PM_GET_RPT_STAMP_FOR_DocID (@DocID)