本文介绍了如何根据XML编写查询来表示数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< row codedescription =银行名称val =Lead Bank-Othersfraudid =1code =1001prelnkbaseid =1>

< row codedescription =欺诈号码val =欺诈=1代码=1002prelnkbaseid =1>

< row codedescription =分支详情val = fraudid =1code =1003prelnkbaseid =1>

< row codedescription =(a)分行代码**val =0220001fraudid =1代码=1004prelnkbaseid =1>

< row codedescription =(b)分支的名称**val =GUWAHATIfraudid =1code =1005 prelnkbaseid =1>

< row codedescription =犯罪者的姓名**val =testfraudid =1code =1006prelnkbaseid =1>

< row codedescription =帐户名称**val =test2fraudid =1code =1007prelnkbaseid =1>

< row codedescription =犯罪者的活动名称**val =test3fraudid =1code =1008prelnkbaseid =1>

< row codedescription = Perpetrato的PAN r **val =test4fraudid =1code =1009prelnkbaseid =1>

< row codedescription =发生欺诈的营业地区** val =Advances - Billsfraudid =1code =1010prelnkbaseid =1>



这是xml数据...

表名---- frauddetails

col name ---行为人姓名,帐户名称,行为人活动名称,欺诈行为,



我尝试过:



INSERT INTO#FMR1XBRL(XBRLCode,PerLnkBaseId,FraudID,circle ,fraudno,brcode,branchid,principalparty,name_of_account,Name_of_perpetrator,Pan_perpetrator,fraudarea,

frdinBorrAcct,consortium_advance,Name_consortium_lead_bank,consortium_leader_amount,fraudnature,Type_of_fraud,ComputerUseYN,ComputerDesc,totalamountinvolved,Amount_frozen,

occurencedate,detectiondate,frauddetectiondelayrsn,rbireportingdt,rbireportingdelayreason,How_fraud_detected,BriefHistory,modu soperandidetails,frdstaffinvolved,frdcustomerinvolved,

frdoutsiderinvolved,frddetectedbyRoZo,Improvementreqdinsystem,AuditdoneaftFrd,WhyfrdnotdetectedinAudit,ActionfrnondetectioninAudit,FIRlodged,Policestation,FIRDate,PoliceinvestigationStatus,

Investigationcompletiondt,Investigationsubmissiondt,FIRNotlodgingreason,SuitFilingdate, Suitfilingposition,InsuranceClaimLodged,ReasonfornotLodgingInsuranceClaim,InternalInvestigationproposed,InternalInvestigationcompdate,departmentalenquiryproposed,

StepstoAviodIncidence,totalamountrecovered,Amtrecoveredfrmparty,amtrecoveredfrminsurance,amtrecoveredfrmothsource,extentoflosstobank,provisionheld,amountwritoff,SuggestionforRBI,wheatherCase_closebyRbi,RptDate)





select(ROW_NUMBER()OVER(PARTITION BY 2 order by fraudkid))+ 1000,1,PerLnkBaseId,fraudkid,circle,fraudno,brcode,branchid,principalparty, name_of_account,Name_o f_perpetrator,Pan_perpetrator,fraudarea,

frdinBorrAcct,consortium_advance,Name_consortium_lead_bank,consortium_leader_amount,fraudnature,Type_of_fraud,ComputerUseYN,ComputerDesc,fraudamount,Amount_frozen,

occurencedate,detectiondate,frauddetectiondelayrsn,rbireportingdt, rbireportingdelayreason,How_fraud_detected,BriefHistory,modusoperandidetails,frdstaffinvolved,frdcustomerinvolved,

frdoutsiderinvolved,frddetectedbyRoZo,Improvementreqdinsystem,AuditdoneaftFrd,WhyfrdnotdetectedinAudit,ActionfrnondetectioninAudit,FIRlodged,Policestation,FIRDate,PoliceinvestigationStatus,

Investigationcompletiondt, Investigationsubmissiondt,FIRNotlodgingreason,SuitFilingdate,Suitfilingposition,InsuranceClaimLodged,ReasonfornotLodgingInsuranceClaim,InternalInvestigationproposed,InternalInvestigationcompdate,departmentalenquiryproposed,

StepstoAviodIncidence,totalamountrecovered,Amtrecoveredfr mparty,amtrecoveredfrminsurance,amtrecoveredfrmothsource,extentoflosstobank,provisionheld,amountwritoff,SuggestionforRBI,wheatherCase_closebyRbi,RptDate

来自frauddetails

解决方案

<row codedescription="Name of the bank" val="Lead Bank-Others" fraudid="1" code="1001" prelnkbaseid="1">
<row codedescription="Fraud number" val="" fraudid="1" code="1002" prelnkbaseid="1">
<row codedescription="Details of the branch" val="" fraudid="1" code="1003" prelnkbaseid="1">
<row codedescription="(a) Branch Code **" val="0220001" fraudid="1" code="1004" prelnkbaseid="1">
<row codedescription="(b) Name of the branch **" val="GUWAHATI" fraudid="1" code="1005" prelnkbaseid="1">
<row codedescription="Name of the Perpetrator **" val="test" fraudid="1" code="1006" prelnkbaseid="1">
<row codedescription="Name of Account **" val="test2" fraudid="1" code="1007" prelnkbaseid="1">
<row codedescription="Name of activity of the Perpetrator **" val="test3" fraudid="1" code="1008" prelnkbaseid="1">
<row codedescription="PAN of Perpetrator **" val="test4" fraudid="1" code="1009" prelnkbaseid="1">
<row codedescription="Area of operation where the fraud has occurred **" val="Advances - Bills" fraudid="1" code="1010" prelnkbaseid="1">

this is xml data...
table name----frauddetails
col name---Name of the Perpetrator ,Name of Account,Name of activity of the Perpetrator,FraudID,

What I have tried:

INSERT INTO #FMR1XBRL(XBRLCode ,PerLnkBaseId ,FraudID,circle ,fraudno ,brcode , branchid ,principalparty ,name_of_account ,Name_of_perpetrator ,Pan_perpetrator ,fraudarea ,
frdinBorrAcct ,consortium_advance ,Name_consortium_lead_bank ,consortium_leader_amount ,fraudnature, Type_of_fraud ,ComputerUseYN ,ComputerDesc ,totalamountinvolved ,Amount_frozen ,
occurencedate ,detectiondate ,frauddetectiondelayrsn ,rbireportingdt ,rbireportingdelayreason , How_fraud_detected ,BriefHistory ,modusoperandidetails ,frdstaffinvolved ,frdcustomerinvolved ,
frdoutsiderinvolved ,frddetectedbyRoZo, Improvementreqdinsystem ,AuditdoneaftFrd ,WhyfrdnotdetectedinAudit , ActionfrnondetectioninAudit ,FIRlodged ,Policestation ,FIRDate ,PoliceinvestigationStatus ,
Investigationcompletiondt ,Investigationsubmissiondt,FIRNotlodgingreason ,SuitFilingdate , Suitfilingposition ,InsuranceClaimLodged ,ReasonfornotLodgingInsuranceClaim ,InternalInvestigationproposed ,InternalInvestigationcompdate ,departmentalenquiryproposed ,
StepstoAviodIncidence ,totalamountrecovered ,Amtrecoveredfrmparty ,amtrecoveredfrminsurance , amtrecoveredfrmothsource ,extentoflosstobank ,provisionheld ,amountwrittenoff ,SuggestionforRBI,wheatherCase_closebyRbi, RptDate )


select (ROW_NUMBER() OVER (PARTITION BY 2 Order by fraudkid))+1000 ,1 as PerLnkBaseId,fraudkid,circle ,fraudno ,brcode , branchid ,principalparty ,name_of_account ,Name_of_perpetrator ,Pan_perpetrator ,fraudarea ,
frdinBorrAcct ,consortium_advance ,Name_consortium_lead_bank ,consortium_leader_amount ,fraudnature, Type_of_fraud ,ComputerUseYN ,ComputerDesc ,fraudamount ,Amount_frozen ,
occurencedate ,detectiondate ,frauddetectiondelayrsn ,rbireportingdt ,rbireportingdelayreason , How_fraud_detected ,BriefHistory ,modusoperandidetails ,frdstaffinvolved ,frdcustomerinvolved ,
frdoutsiderinvolved ,frddetectedbyRoZo, Improvementreqdinsystem ,AuditdoneaftFrd ,WhyfrdnotdetectedinAudit , ActionfrnondetectioninAudit ,FIRlodged ,Policestation ,FIRDate ,PoliceinvestigationStatus ,
Investigationcompletiondt ,Investigationsubmissiondt,FIRNotlodgingreason ,SuitFilingdate , Suitfilingposition ,InsuranceClaimLodged ,ReasonfornotLodgingInsuranceClaim ,InternalInvestigationproposed ,InternalInvestigationcompdate ,departmentalenquiryproposed ,
StepstoAviodIncidence ,totalamountrecovered ,Amtrecoveredfrmparty ,amtrecoveredfrminsurance , amtrecoveredfrmothsource ,extentoflosstobank ,provisionheld ,amountwrittenoff ,SuggestionforRBI, wheatherCase_closebyRbi, RptDate
from frauddetails

解决方案


这篇关于如何根据XML编写查询来表示数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 16:57