Paul Rajs

Paul Rajs

  • NA
  • 641
  • 146.9k

How can i Parse and get the Table and Coulmns Names from this Sql Quer

Jul 27 2022 7:09 AM

Hi Developers,

I need Parse and get the Table Name and Coulmns Names from the below Sql Query  and saved in a Array variable using C# code. 

select ce.CNTCT_EVENT_SID,sv.SRVC_PRVIDR_NAME, cet.CNTCT_EVENT_TYPE_CODE,cc.CNTCT_CHNL_NAME,
ce.EVENT_CID,ce.EVENT_IN_OUT_IND,ce.EVENT_DTTM,ce.EVENT_RSN_TXT,ce.ENTITY_PROXY_ID,ce.CSTMR_IND,
ce.INDVDL_PERSNL_DATA_LINK_SID,ce.RCPNT_ID,ce.FIRST_NAME,ce.LAST_NAME,ce.EMAIL_ADDR_ENCR,ce.PHN_NBR,
ce.BILLG_ACCT_NBR
from contact_history.contact_event ce
join contact_history.service_provider sv on ce.SRVC_PRVIDR_SID=sv.SRVC_PRVIDR_SID
join contact_history.contact_channel cc on cc.CNTCT_CHNL_SID=ce.CNTCT_CHNL_SID
join contact_history.contact_event_type cet on  cet.CNTCT_EVENT_TYPE_SID=ce.CNTCT_EVENT_TYPE_SID
where CSTMR_IND='Y' and EVENT_IN_OUT_IND ='Outbound

 

I have tried this from google , but i did not get exepected output. If anyone know this kindly suggest ,e to do this.

Thanks & Regards

Paul.S

 

 


Answers (6)