Blank xml namespace in child nodes in SQL Server
Hi i need help with the following in sql: I need to create a xml file in this format <Document xmlns="urn:iso:std:iso:20022:tech:xsd:001.002.001.04"> <FIToFIPmtStsRpt> <GrpHdr> <MsgId></MsgId> </GrpHdr> <OrgnlGrpInfAndSts> <OrgnlMsgId /> </OrgnlGrpInfAndSts> </FIToFIPmtStsRpt> </document> at the moment i have a variable that holds the main info and i build up the between info (take it that grphdr can be inserted multiple times back into the main xml, with different info) declare @xml xml='<Document xmlns="urn:iso:std:iso:20022:tech:xsd:001.002.001.04"> <FIToFIPmtStsRpt> </FIToFIPmtStsRpt> <