Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

OpenXML in SQL and converting from nvchar to int

$
0
0

I am passing an xml document to a stored procedure. To pass it, I have to convert everything to String. In my database I have 2 columns that are int though. How can I convert the information to an int value in my stored procedure?

Error: Conversion failed when converting the nvarchar value 'III' to data type int.

I tried the below, but have the error: Incorrect syntax near '('. Line 33

Cast([LineId] as int) int,
				--[LineId] int,
				[Phone] nvarchar(12),


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>