Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

SQL: How to test store procedure by pass ntext parameter?

$
0
0

We need to test store procedure logic and need to pass a parameter as ntext.

the parameter value is like xml string

Declare @DayPartsChanges ntext 
Set @DayPartsChanges = '<?xml version="1.0" encoding="utf-16" standalone="yes"?><SiteSections><Row><DayPort>1122</DayPort><DayPortName>Overnight</DayPortName><StartTime>2013-05-31T00:00:00</StartTime><EndTime>2013-05-31T04:00:00</EndTime><Exclude>0</Exclude><DayPortID>6</DayPortID></Row></SiteSections>'

we set it in single quote, it does not work.

It complaints as "The text, ntext, and image data types are invalid for local variables.

How should we pass in? Thx!


JaneC




Viewing all articles
Browse latest Browse all 23857

Trending Articles



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