Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Liat001
Starting Member
17 Posts |
Posted - 2010-04-18 : 10:13:42
|
Hello All.I have a problem in Xml.I open xml line with 'sp_xml_preparedocument' and when I have empty Tag I got sometimes empty string into Param/ and somtimes null.the Param Type is the same in both cases.why ?thanks |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-19 : 05:11:15
|
can you illustrate your problem with data sample?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Liat001
Starting Member
17 Posts |
Posted - 2010-04-21 : 03:24:55
|
yes, for example I have xml line like :...<A></A><B></B>...In my SP I wrote:EXEC sp_xml_preparedocument @handle OUTPUT, @Lines/**************************** OPEN XML INTO TEMP TABLE *****************************************/BEGIN TRY SELECT * INTO #tmpLinesTableFROM OPENXML (@handle, 'RootXMLGrid/Row',2) WITH ( A varchar(50),B varchar(50))tblXMLExec sp_xml_removedocument @handle END TRYIn A I have null,and in B I have the value ''.Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-21 : 06:09:53
|
are A & B of same datatypes as in sample above?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Liat001
Starting Member
17 Posts |
Posted - 2010-04-22 : 01:45:57
|
I forgot to write that I insert the data from the table into params.the params type are the same - varchar(50).the types are the same all way...declare @A varchar(50),@B varchar(50) |
|
|
|
|
|