You are here: Re: xml into mssql 2000 « MsSQL Server « IT news, forums, messages
Re: xml into mssql 2000

Posted by Tom on 03/26/07 12:36

http://www.quicksqlserver.com/2007/03/openxml_more_th.html

--

Jack Vamvas
___________________________________
Advertise your IT vacancies for free at - http://www.ITjobfeed.com



"AJA" <ajanospam74@gazeta.pl> wrote in message
news:eu7tql$dff$1@inews.gazeta.pl...
>> You should be able to do up to 8000 characters, reset where you have 1000
>> and replace it with 8000.
>> If you have a requirement for more than 8000 , reply and I'll send you a
>> stored procedure that handles this problem
>
> It will be about 20MB XML file. So more than 8000 characters. Thank you
> for reply and I'm waiting for procedure.
>
> Best Regards
> AJA
>
>>
>> --
>>
>> Jack Vamvas
>> ___________________________________
>> Advertise your IT vacancies for free at - http://www.ITjobfeed.com
>>
>>
>>
>> "AJA" <ajanospam74@gazeta.pl> wrote in message
>> news:ettb3e$9lj$1@inews.gazeta.pl...
>>> Hello
>>> I watchet some posts but did not find answer to my question : how
>>> to import data from xml into mssql 2000 using t-sql?
>>>
>>> i tried:
>>>
>>> USE Northwind
>>> if(object_id('dbo.test_xml') is not null)
>>> drop table dbo.test_xml
>>> go
>>> create table dbo.test_xml (Id int identity(1,1), col1 text)
>>> go
>>> insert into test_xml(col1) values('')
>>> go
>>> declare @cmd varchar(512)
>>> set @cmd = 'D:\Progra~1\Micros~3\MSSQL\Binn\TextCopy.exe /S /U
>>> [user] /P [password] /D Northwind /F c:\pobierz.xml /T
>>> test_xml /C col1 /I /W "where Id = 1"'
>>> exec master..xp_cmdshell @cmd, 'no_output'
>>> go
>>> declare
>>> @hdoc int
>>> , @doc varchar(1000)
>>> select @doc = col1 from dbo.test_xml
>>> exec sp_xml_preparedocument @hdoc out, @doc
>>> select @hdoc as hdoc
>>> -- ...
>>> select * from openxml(@hdoc, ...
>>>
>>> --...
>>> exec sp_xml_removedocument @hdoc
>>>
>>> But my documet have more than 1000characters and more than max varchar.
>>> So how to do that?
>>>
>>>
>>> Best regards
>>> AJA
>>
>>
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация