Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Importing the OFAC SDN list via XML


Importing the OFAC SDN list via XML

Author
Message
abad79
abad79
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 5
Hi i have the same issue in my company.

Can you help me with the source code of your solution to import to SQL 2005.

Thanks a lot for all your help

Best Regards

Carlos Jaramillo
omarovigh
omarovigh
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 4
HI I AM DAHAR AND I AM WORKING WITH SNDLIST SO I NEED YOUR HELP SINCE YOU HAVE DONE ALREADY THANKS FOR YOUR HELP I NEED THE INFORMATION BECAUSE I NEED TO EXPORT TO A TABLE.

SO IF YOU CAN HELP ME I WILL BE HAPPY.

THANKS
pcecereatgmaildotcom
pcecereatgmaildotcom
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 36
sorry, i just saw your message.
my email is pcecereatgmail
send me a message, pls.
Pablo
jigneshp
jigneshp
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 11
Hello,

I have same requirements for SDN check. If you have already done work and could help me i will appreciate it

Thanks,
Jignesh
pcecereatgmaildotcom
pcecereatgmaildotcom
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
Points: 16 Visits: 36
I am not working at that place anymore.
I dont have access to that code. Sorry

I can guide you, if you tell me something more about where you are now...
What have you done??
pradeep.pokharel
pradeep.pokharel
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 107
hi Don't know if you still have the process, if you have one can you please share it.
Eirikur Eiriksson
Eirikur Eiriksson
SSCertifiable
SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)SSCertifiable (6.8K reputation)

Group: General Forum Members
Points: 6842 Visits: 17777
This might help;

USE tempdb;
GO
CREATE TABLE dbo.TBL_XML_DOC
( XML_DOC_ID int identity(1,1) primary key clustered not null
,XML_DOCUMENT xml);
GO

INSERT INTO dbo.TBL_XML_DOC(XML_DOCUMENT)
SELECT * FROM OPENROWSET(
BULK 'C:\Download\sdn.xml',
SINGLE_BLOB) AS x;


;WITH XMLNAMESPACES ( DEFAULT 'http://tempuri.org/sdnList.xsd')
SELECT
XD.XML_DOC_ID
,ROW_NUMBER() OVER (PARTITION BY RN.ODE.value('./uid[1]','INT') ORDER BY (SELECT NULL)) AS X_RID
,RN.ODE.value('./uid[1]' ,'INT' ) AS uid
,RN.ODE.value('./lastName[1]' ,'NVARCHAR(256)' ) AS lastName
,RN.ODE.value('./sdnType[1]' ,'NVARCHAR(256)' ) AS sdnType
,PRO.GRAM.value('program[1]' ,'NVARCHAR(256)' ) AS program
,AK.A.value('uid[1]' ,'NVARCHAR(256)' ) AS AKA_uid
,AK.A.value('type[1]' ,'NVARCHAR(256)' ) AS type
,AK.A.value('category[1]' ,'NVARCHAR(256)' ) AS category
,AK.A.value('lastName[1]' ,'NVARCHAR(256)' ) AS lastName

,DOBI.TEM.value('uid[1]' ,'NVARCHAR(256)' ) AS DOB_uid
,DOBI.TEM.value('dateOfBirth[1]' ,'NVARCHAR(256)' ) AS DOB_dateOfBirth
,DOBI.TEM.value('mainEntry[1]' ,'NVARCHAR(256)' ) AS DOB_mainEntry

,PLO.BIRTH.value('uid[1]' ,'NVARCHAR(256)' ) AS POB_uid
,PLO.BIRTH.value('placeOfBirth[1]' ,'NVARCHAR(256)' ) AS POB_placeOfBirth
,PLO.BIRTH.value('mainEntry[1]' ,'NVARCHAR(256)' ) AS POB_mainEntry

--,RN.ODE.query('(.)')
FROM dbo.TBL_XML_DOC XD
OUTER APPLY XML_document.nodes('sdnList/sdnEntry') AS RN(ODE)
OUTER APPLY RN.ODE.nodes('programList') AS PRO(GRAM)
OUTER APPLY RN.ODE.nodes('akaList/aka') AS AK(A)
OUTER APPLY RN.ODE.nodes('dateOfBirthList/dateOfBirthItem') AS DOBI(TEM)
OUTER APPLY RN.ODE.nodes('placeOfBirthList/placeOfBirthItem') AS PLO(BIRTH)

GO
DROP TABLE dbo.TBL_XML_DOC;


Cool
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search