sql server - Import XML to SQL -


Sorry to put one more post about this topic, but I am trying to import this XML database without success. This is XML:

  & lt; Session xmlns = "http://winscp.net/schema/session/1.0" start = "2014-11-03T17: 23: 22.376Z" & gt; & Lt; Ls & gt; & Lt; Destination value = "/ output" /> & Lt; Files & gt; & Lt; File & gt; & Lt; Filename value = "." / & Gt; & Lt; Type value = "d" /> & Lt; Revision Value = "2014-11-03T12: 17: 58.000Z" /> & Lt; Permission value = "rwxr-sr-x" /> & Lt; / File & gt; & Lt; File & gt; & Lt; Filename value = "7215_SG.csv" /> & Lt; Type value = "-" /> & Lt; Size value = "1584161" /> & Lt; Revision Value = "2014-11-03T12: 06: 46.000Z" /> & Lt; Permission value = "rw-r - r--" /> & Lt; / File & gt; & Lt; File & gt; & Lt; Filename value = "6171_SG.csv" /> & Lt; Type value = "-" /> & Lt; Size value = "2298481" /> & Lt; Revision Value = "2014-11-03T12: 05: 13.000Z" /> & Lt; Permission value = "rw-r - r--" /> & Lt; / File & gt; & Lt; / Files & gt; & Lt; Results success = "true" /> & Lt; / Ls> & Lt; / Session & gt;  

And this SQL statement to import XML:

 SELECT xmldata.value ( '(./filename / @ value) [1]', 'NVARCHAR (50) as Ssfilennam, xmldata.value ( '(./type / @ value) [1],' Anviacaaraar (50) ") Ssteepi, Aksmeldatakvlyue ( '(. / Size / @ value) 1 ] ',' Anviacaaraar (50) ") Sssijh, xmldata.value ( '(./ modification / @ value) [1],' Ankvi.acaaraar (50)") Ssmaksifikeshn, Aksmeldata. value ( '(. / Permissions / @ value) [1] ',' NVHAR (50) ') as the SSAP (OpenOvos Select Bell IV, or (X AS XML) (Bulk 'D: \ Temporary test). X)) AS T (X) Cross x.nodes (' / session / ls / files / file ') AS X (Xmldata) Apply as; 

Can you help me and tell me what I am doing?

Thank you in advance!

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -