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 |
|
Sudhindra
Starting Member
13 Posts |
Posted - 2009-01-19 : 01:21:08
|
| Hi, I am sending a XML in string format to my Procedure. I have a Column which takes Null Value. if the Text box is empty I am trying to send Null in the XML. But i keep getting exception unable to convert nnvarchar to numeric.<Root> <LValue=''><Root>.IF valuethen<Root> <LValue='109.00'><Root>.So how can I send Null value in XMl so I can insert Null in the Column. IF i have somevalue in the text box I would like to send it in XML. the column is Decimal. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-19 : 02:33:42
|
| try<Root><LValue xsi:nil="true"><Root>. |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-19 : 03:10:30
|
Or use NULLIF(yourcolhere, '') to get result as NULL. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
Sudhindra
Starting Member
13 Posts |
Posted - 2009-01-19 : 05:57:52
|
| Hey Peso, Thanks, it worked. I used in my SQl procedure NULLIF(LValue,''). Now I am able to insert Records with open xml.Cannot build a string with LValue xsi:nil="true".Thanks Again guys for the helping out. Really appreciate it. |
 |
|
|
|
|
|