-2

When I import the XML into Access, One of the XML columns is trimmed in Access database. Is there any way to specify the data type for each column when importing into Access?

I tried to change the column size but it allows 255 character only but my column in XML is more than 255. I want to copy an XML file to Access database and from Access database to SQL.

Please let me know the method and i have to create two tables from one xml

I have tried using directly importing from xml to sql. i got one link if i click link one query window will open . Now i have to create two table . could you help me which tag i have used in open XML query.

enter image description here

  • You need to use a Long Text / Memo column. – Andre Jul 23 '18 at 13:08
  • ya i even tried with this but still result got trimmed @Andre –  Jul 23 '18 at 13:10
  • why cant you load the xml directly into sql server? – WhatsThePoint Jul 23 '18 at 13:20
  • @WhatsThePoint i can load . Please help me on this –  Jul 23 '18 at 13:22
  • @DataBase what I'm saying is cut the ms access middle man and directly put xml into sql server – WhatsThePoint Jul 23 '18 at 13:23
  • @WhatsThePoint . I am trying with your method. but i dont know how it exactly follows. could you please help me on this .i got one row with hyper link if i click that link . Root hyperlink query window willopen –  Jul 23 '18 at 13:25
  • @Andre i have edited my query . Please let me know which tag i have to use. –  Jul 23 '18 at 14:05
  • @WhatsThePoint . i have edited my query . Please let me know which tag i have to use. –  Jul 23 '18 at 14:05
  • Please add to your question: 1) what are you trying to import? (you have the screenshot, but the actual xml text would be better. 2) how exactly are you importing it? 3) what is the result and what is the problem with it? – Andre Jul 23 '18 at 14:12
  • Also: what "link"? And "SQL" is not a system, it's a language. – Andre Jul 23 '18 at 14:13

2 Answers2

1

Ya , there is a limitation to MS Access. But there is solution . Let the Access create a table . But create a structure of table by renaming the older one and Now just Append the data to the New one which is having Structure . before that change data type to LONG- Text. That's it :)

0

Sorry, there is a limitation to MS Access. I do not believe there is a way to do what you are trying to. Can you not import it directly to SQL Server?

greglorious_85
  • 71
  • 2
  • 15
  • i can import . but i need all text as that of xml. @greglorious_85 –  Jul 23 '18 at 13:09
  • i got one row with hyper link if i click that link . Root hyperlink query window will open –  Jul 23 '18 at 13:30
  • Have you tried something like this?: https://stackoverflow.com/questions/16838627/import-xml-into-sql-server – greglorious_85 Jul 23 '18 at 13:31
  • i have edited my query . Please let me know which tag i have to use. –  Jul 23 '18 at 14:04
  • @ALollz i think now you can help me https://stackoverflow.com/questions/51481333/how-to-create-two-tables-using-xml –  Jul 23 '18 at 14:39