ya tengo un script así:
/**********************************************************************************/
-- REPORTNAME : Formato Cheque DEBIT/CREDIT
-- COMPANY :
-- DATABASE :
-- DATE ORIGINAL: -2015
-- LASTE UPDATE : -2015
-- PROGRAMMER : UKsoft
-- VM : 9(1)
-- VM : 9(2)
-- DESCRIPTION :
-- DESCRIPTION :
/**********************************************************************************/
set nocount on
SET ANSI_WARNINGS off
-- credit line
select top 1
cast(H1.PmntDate as date) [Date]
, UPPER(H1.VendorName) [CardName]
, H1.CheckSum [CheckSum]
,LineDitail [Detail]
,H1.Details [Detail2]
, '**'+cast(cast(H1.CheckSum as dec(19,2)) as varchar)+'**' [CheckSumStr]
, '***'+TotalWords+'***' [CantidadConLetra]
, CheckAcct [AcctCode]
, (select AcctName from OACT where AcctCode = CheckAcct) [ActName]
, 0 [Debit]
, CHECKSUM [Credit]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),9,1) [D1]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),10,1) [D2]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),6,1) [M1]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),7,1) [M2]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),3,1) [Y1]
,SUBSTRING(CAST(cast(H1.PmntDate as date) AS VARCHAR),4,1) [Y2]
from CHO1 L1
inner join OCHO H1 on L1.CheckKey = H1.CheckKey
where L1.CheckKey = '2501'
-- Vendor information
union all
select top 1
null
, null
, null
, null
, null
, null
, null
, H1.VendorCode
, VendorName
, null
, null
, null
, null
, null
, null
, null
, null
from CHO1 L1
inner join OCHO H1 on L1.CheckKey = H1.CheckKey
inner join OVPM H2 on H1.TransRef = H2.DocNum
left join VPM4 L2 on H2.DocEntry = L2.DocNum and L2.LineId = L1.LineId
where L1.CheckKey = '2501'
-- check rows
union all
select
null
, null
, null
, null
, null
, null
, null
, L2.AcctCode
, LineDitail
, TotalLine
, 0
, null
, null
, null
, null
, null
, null
from CHO1 L1
inner join OCHO H1 on L1.CheckKey = H1.CheckKey
inner join OVPM H2 on H1.TransRef = H2.DocNum
left join VPM4 L2 on H2.DocEntry = L2.DocNum and L2.LineId = L1.LineId
where L1.CheckKey = '2501'
select * from CHO1 where CheckKey='2501'
me imprime todo pero solo la primera línea, qué me recomienda para imprimir la segunda también en este mismo comando