Originally posted by: pratikdeshmukh
sure
USE [HRL_Process]
GO
/****** Object: StoredProcedure [HRO].[get_outbound_elig_data] Script Date: 1/30/2018 1:27:13 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [HRO].[get_outbound_elig_data] (@trx_id varchar(20) = null)
AS
BEGIN
--declare @trx_id varchar(20) = 'HRO0112'
select
M.plan_id as plan_id
,E.group_no as group_no
,PG.Group_Name as group_name
,M.mem_id as mem_id
,M.suffix as suffix
,M.memstatus as Memstatus
,E.effdate as Effdate
,E.termdate as Termdate
,M.relation as RelationCode
,M.mem_last as LastName
,M.mem_first as FirstName
,M.mem_mid as MiddleInitial
,M.dob as DOB
,M.sex as Sex
,M.address as Address1
,M.address2 as Address2
,M.city as City
,M.state as State
,M.zip as Zip
,isnull(m.phone,'') as Phone1
,isnull(m.work_phone,'')
,isnull(m.email,'') as Email
,m.cs1
,m.cs2
,m.cs3
,m.cs4
,m.cs6
,m.cs10
,m.cs11
from
<differentdatabase>.<databasetablke> M with (nolock index=PK__member)
inner join <differentdatabase>..<databasetablke> E with (nolock index=PK_enroll_1__15) on M.<databasetablke> = E.<databasetablke> and M.<databasetablke> = E.<databasetablke>and E.<databasetablke> = M.<databasetablke>
inner join <differentdatabase>..<databasetablke> PG WITH (NOLOCK INDEX=PK_plan_groupx_1__15) on E.<databasetablke> = PG.<databasetablke> and E.<databasetablke> = PG.<databasetablke>
inner join HRL_Process.HRO.transaction_setup S WITH (NOLOCK) on S.elig_plan_id = M.plan_id
inner join HRL_Process.HRO.transaction_setup_elig_group_numbers GN on S.trx_id = GN.trx_id and GN.elig_group_no = E.group_no
where
S.trx_id = @trx_id
and S.active = 1
END
Also paul i tried calling the stored procedure using a query and it worked and gave me all the schema from the query itself.
I have attached that query here for your reference.
Moreover,I am ubale to generate csv output file using the new schema that was generated using the query.
I get an error stating "Output argument of rule does not match output item sub-class". Could you let me know how i can resolve this.
I have added the output structure previously (csv file separated by double quotes"
#IBMSterlingTransformationExtender#IBM-Websphere-Transformation-Extender#DataExchange