<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