Can anyone give me sample scripts to generate output txt file in pipe format.
For example I have following sql script needed to generate output in pipe format automatically in unix environment
SELECT
c.CASES_CODE as Case_Cde,
'20090506' AS OR_Event_Data_Effctv_Dte,
pth.PHST_ACCOUNT AS Pt_Acct_Nbr,
pt.PAT_MEDREC AS MRN,
sn2.NODE_TYPEID AS T2_Event_Type_Id,
t1.TYPE_DESCRP AS T2_Event_Type_Dscr,
rtrim(sn2.NODE_MNEMONIC) AS T2_Event_Id,
sn2.NODE_DESCRP AS T2_Event_Id_Dscr
FROM CASES c,CASEMAS cm, PATHIST pth,PATMAS pt,SYS_TREE st1,SYS_TIME st1,SYS_TREE st2,SYS_NODE sn2,SYS_TYPE t1,SYS_TIME tm1
where
c.CASSES_PHISTID = pth.PHST_ID
and c.CASS_CODE = cm.SH_MGRLOG
and pth.phst_Patid = pt.PAT_ID
and c.CASS_ID = st1.TREE_HANDLE
AND st1.TREE_HANDLE = st1.TREE_NODEID
and st1.TREE_ID = tm1.TIME_TREEID
Thanks in advance
For example I have following sql script needed to generate output in pipe format automatically in unix environment
SELECT
c.CASES_CODE as Case_Cde,
'20090506' AS OR_Event_Data_Effctv_Dte,
pth.PHST_ACCOUNT AS Pt_Acct_Nbr,
pt.PAT_MEDREC AS MRN,
sn2.NODE_TYPEID AS T2_Event_Type_Id,
t1.TYPE_DESCRP AS T2_Event_Type_Dscr,
rtrim(sn2.NODE_MNEMONIC) AS T2_Event_Id,
sn2.NODE_DESCRP AS T2_Event_Id_Dscr
FROM CASES c,CASEMAS cm, PATHIST pth,PATMAS pt,SYS_TREE st1,SYS_TIME st1,SYS_TREE st2,SYS_NODE sn2,SYS_TYPE t1,SYS_TIME tm1
where
c.CASSES_PHISTID = pth.PHST_ID
and c.CASS_CODE = cm.SH_MGRLOG
and pth.phst_Patid = pt.PAT_ID
and c.CASS_ID = st1.TREE_HANDLE
AND st1.TREE_HANDLE = st1.TREE_NODEID
and st1.TREE_ID = tm1.TIME_TREEID
Thanks in advance