Yes I want to show the attribute.
How do I provide you the data? The database is too big.
This is the query I used:
SELECT TOP 100 (
SELECT TOP 3
--[List_ID]
-- ,
[List_Type]
--,[List_Description]
-- ,[List_Provider]
-- ,[Issuing_Body]
,
(
SELECT TOP 100
--[UniqueID]
--,
[Record_ID]
,[Record_Type]
,[Title]
,[Alternate_Title]
,[Full_Name]
,[Gender]
,[Nationality]
,[Source]
,[Date_of_Capture]
,[Soft_Delete]
,[Date_of_Soft_Delete]
--,[Catefor xml path ry]
--,[Sub_Catefor xml path ry]
,[Listed_On]
,[Modified_On]
--,[Individual_List_ID_FK]
,
(
SELECT TOP 100
--[NatId_PK]
-- ,[NatId_Record_ID_FK]
--,[NatId_UniqueID_FK]
--,
[NatID_Type]
,[NatID_Num]
,[NatID_issue]
,[NatID_expiry]
,[NatID_State_Province]
,[NatID_Country]
,[isNationality]
from National_Identity
--where NatId_Record_ID_FK=Record_ID
where NatId_UniqueID_FK=UniqueID
for xml path('National_Identity'), root('National_Identitities') , elements xsinil, type) as [*],
(
SELECT TOP 100
--[Add_Id]
--,
[Address_Line_1]
,[Address_Line_2]
,[Address_Line_3]
,[Address_Line_4]
,[Town_District]
,[City]
,[County_State]
,[Post_Zip_Code]
,[Country]
,[ISO_Country]
,[Soft_Delete_Address]
--,[Address_Record_ID_FK]
--,[Address_UniqueID_FK]
From Address
where Address_UniqueID_FK = UniqueID
--where Address_Record_ID_FK = Record_ID
for xml path('Address'), root('Addresses'), elements xsinil,type) as [*],
(
SELECT TOP 100
--[AliasID]
--,
[Title]
,[Alternate_Title]
,[Forename]
,[Middle_Name]
,[Surname]
,[Full_Alias]
,[Soft_Delete]
-- ,[Alias_Record_ID_FK]
-- ,[Alias_UniqueID_FK]
from Alias
where Alias_UniqueID_FK = UniqueID
--where Alias_Record_ID_FK = Record_ID
for xml path('Alias'), root('Aliases'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[Birth_ID]
--,[Birth_Details_Record_ID_FK]
--,[Birth_Details_UniqueID_FK]
-- ,
[Date_of_Birth]
,[Place_of_Birth]
,[Year_of_Birth]
from Birth_Details
--where Birth_Details_Record_ID_FK = Record_ID
where Birth_Details_UniqueID_FK = UniqueID
for xml path('Birth_Detail'), root('Birth_Details'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[Death_ID]
-- ,[Death_Details_Record_ID_FK]
-- ,[Death_Details_UniqueID_FK]
-- ,
[Date_of_Death]
,[Year_of_Death]
,[Place_of_Death]
from Death_Details
--where Death_Details_Record_ID_FK = Record_ID
where Death_Details_UniqueID_FK = UniqueID
for xml path('Death_Detail'), root('Death_Details'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[ConInfo_ID]
--,[ConInfo_Record_ID_FK]
--,[ConInfo_UniqueID_FK]
--,
[Home_Telephone]
,[Business_Telephone]
,[Mobile_Telephone]
,[Fax]
,[Email]
from Contact_Info
--where ConInfo_Record_ID_FK = Record_ID
where ConInfo_UniqueID_FK = UniqueID
for xml path('Contact_Info'), root('Contact_Infos'), elements xsinil, type) as [*],
(
SELECT TOP 100
[Individual_ID_2]
,[Description_of_Relationship]
,[Soft_Delete]
--,[IndAssoc_Record_ID_FK]
--,[IndAssoc_UniqueID_FK]
from Individual_Association
--where IndAssoc_Record_ID_FK = Record_ID
where IndAssoc_UniqueID_FK = UniqueID
for xml path('Individual_Association'), root('Individual_Associations'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[Business_ID]
-- ,
[Business_Name]
,[Short_Name]
,[Registered_At]
,[Registration_Number]
,[Date_of_Incorportion]
,[Country]
,[City]
,[State]
,[Province]
,[Description]
,[Soft_Delete]
-- ,[BusAssoc_Record_ID_FK]
-- ,[BusAssoc_UniqueID_FK]
from Business_Association
--where BusAssoc_Record_ID_FK= Record_ID
where BusAssoc_UniqueID_FK= UniqueID
for xml path('Business_Association'), root('Business_Associations'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[Art_Id]
-- ,
[Original_URL]
,[Provider_URL]
,[File_Name]
,[Source]
,[Date_of_Capture]
--,[Article_Record_ID_FK]
--,[Article_UniqueID_FK]
,[Title]
,[SnippetText]
,[Adverse_Terms]
from Article
--where Article_Record_ID_FK= Record_ID
where Article_UniqueID_FK= UniqueID
for xml path('Article'), root('Articles'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[Note_Id]
--,
[Source_of_Notes]
,[Notes]
,[Soft_Delete]
-- ,[Note_Record_ID_FK]
-- ,[Note_UniqueID_FK]
from Note
--where Note_Record_ID_FK= Record_ID
where Note_UniqueID_FK= UniqueID
for xml path('Note'), root('Notes'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[PolPos_ID]
-- ,
[Description]
,[From]
,[To]
,[Country]
,[Soft_Delete]
--,[PolPos_Record_ID_FK]
--,[PolPos_UniqueID_FK]
,[PEP_Tier]
,[Designation]
,[Institution]
,[Risk_Category]
from Political_Position
--where PolPos_Record_ID_FK= Record_ID
where PolPos_UniqueID_FK= UniqueID
for xml path('Political_Position'), root('Political_Positions'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[PubDet_Record_ID_FK]
--[PubDet_UniqueID_FK]
--,
[PubDet_ID]
,[FullAccessURL]
,[LimitedAccessURL]
from Publishing_Details
--where PubDet_Record_ID_FK= Record_ID
where PubDet_UniqueID_FK= UniqueID
for xml path('Publishing_Detail'), root('Publishing_Details'), elements xsinil, type) as [*],
(
SELECT TOP 100
--[PIden_Record_ID_FK]
--[PIden_UniqueID_FK]
-- ,[PIden_ID]
--,
[Photo]
,[File_Name1]
,[URL_Photo]
,[Date_of_Capture]
from Photo_Identity
--where PIden_Record_ID_FK= Record_ID
where PIden_UniqueID_FK= UniqueID
for xml path('Photo_Identity'), root('Photo_Identities'), elements xsinil, type) as [*]
from Individual
WHERE [Individual_List_ID_FK] = [List_ID]
for xml path ('Individual'), root('Individuals'), elements xsinil, type) as [*]
from [dbo].[List]
--where List_ID = [Individual_List_ID_FK]
for xml path('List'), root ('Lists'), elements xsinil, type) as [final]