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 |
avmreddy17
Posting Yak Master
180 Posts |
Posted - 2009-04-02 : 12:19:32
|
I am trying to replace a text Value with the XML StringI get the below error. There is + in the XML String which it does not like it.. How to get around it..Msg 102, Level 15, State 1, Line 66Incorrect syntax near '+'.EXEC sp_dboption 'ConfigDB', 'select into/bulkcopy', 'true'GODECLARE @ptr varbinary(16)SELECT @ptr = TEXTPTR(Profile)FROM dbo.BrokerProfileWHERE BrokerProfileID = 'ONETicket1'SELECT @ptr WRITETEXT test.test_text @ptr '<BrokerProfile> <Broker name="RBC"> <Contact value="RBC Electronic Trading"/> <Telephone value="800-555-1212"/> <Email value="Support@rbccm.com"/> <Colors background="0,53,169" text="249,209,23"/> <Desk name="ALGO"> <UserControlType name="Start Time" type="Time" FIXTAG="t.168" Precision="2" Format="hh:mm:ss am"/> <UserControlType name="End Time" type="Time" FIXTAG="t.126" Precision="2" Format="hh:mm:ss am" /> <UserControlType name="End Date" type="Date" FIXTAG="t.432" Format="mm/dd/yy" /> <UserControlType name="Min Qty" type="Value Spin" FIXTAG="i.110" increment="100" inclusive="1" min="0" max="999999" /> <UserControlType name="Description" type="Text" /> <UserControlType name="Execution Mode" type="Combo" FIXTAG="c.5906"> <Choice name="Neutral" FIXVAL="0" /> <Choice name="Passive" FIXVAL="1" /> <Choice name="Aggressive" FIXVAL="2" /> </UserControlType> <UserControlType name="Trigger Price" type="Price Spin" FIXTAG="d.5167" increment="0.01" inclusive="1" min="0" max="999999" /> <UserControlType name="Peg To (Fixed)" type="Combo" FIXTAG="s.7301"> <Choice name="Fixed" FIXVAL="T" /> </UserControlType> <UserControlType name="Peg To (Dynamic)" type="Combo" FIXTAG="s.7301"> <Choice name="Last" FIXVAL="L" /> <Choice name="Mid" FIXVAL="M" /> <Choice name="Opening" FIXVAL="O" /> <Choice name="Market" FIXVAL="P" /> <Choice name="Primary" FIXVAL="R" /> <Choice name="Best Bid" FIXVAL="B" /> <Choice name="Best Offer" FIXVAL="A" /> </UserControlType> <UserControlType name="Peg Diff" type="Price Spin" FIXTAG="d.211" increment="0.01" inclusive="1" min="-999999" max="999999" /> <UserControlType name="% Volume" type="Value Spin" FIXTAG="i.849" increment="1" inclusive="1" min="0" max="100" multiplier="0.01" IsPercent="1"/> <UserControlType name="Benchmark ID" type="Symbol" FIXTAG="s.6693"/> <UserControlType name="Min % Volume" type="Value Spin" FIXTAG="i.6067" increment="1" inclusive="1" min="0" max="100" multiplier="0.01" IsPercent="1"/> <UserControlType name="Max % Volume" type="Value Spin" FIXTAG="i.6064" increment="1" inclusive="1" min="0" max="100" multiplier="0.01" IsPercent="1"/> <UserControlType name="Reference Price" type="Combo" FIXTAG="c.6087"> <Choice name="Last" FIXVAL="L" /> <Choice name="Open" FIXVAL="O" /> <Choice name="PrevClose" FIXVAL="C" /> </UserControlType> <UserControlType name="Strategy Style" type="Combo" FIXTAG="i.6171"> <Choice name="Value" FIXVAL="0" /> <Choice name="Momentum" FIXVAL="1" /> <Choice name="TargetPrice" FIXVAL="2" /> </UserControlType> <UserControlType name="Completion Price" type="Price Spin" FIXTAG="d.6188" Precision="2" increment="0.01" inclusive="1" min="0" max="999999" /> <UserControlType name="Buyback" type="Combo" FIXTAG="c.9649"> <Choice name="Yes" FIXVAL="Y" /> <Choice name="No" FIXVAL="N" /> </UserControlType> <UserControlType name="Post Route" type="Combo" FIXTAG="i.5059"> <Choice name="ARCA" FIXVAL="16384" /> <Choice name="NYSE" FIXVAL="8192" /> <Choice name="NSDQ" FIXVAL="32" /> <Choice name="EGDA" FIXVAL="1024" /> <Choice name="EGDX" FIXVAL="1048578" /> </UserControlType> <OrderType name="Market"> <UserControl name="Description" enabled="1" Default="Routes to RBC''' + 's best in class Smart Order Router" row="6" column="1" height="3" /> </OrderType> <OrderType name="Limit"> <UserControl name="Description" enabled="1" Default="Routes to RBC''' + 's best in class Smart Order Router" row="6" column="1" height="3" /> <UserControl name="Post Route" enabled="1" Default="NSDQ" required="0" row="1" column="1"/> </OrderType> <OrderType name="On Open"> <UserControl name="Description" enabled="1" Default="On Open orders are orders to buy or sell equities at or near the official market opening price. Note: Specific Exchange''' +'s Opening Prices may differ." row="6" column="1" height="3" /> </OrderType> <OrderType name="On Close"> <UserControl name="Description" enabled="1" Default="On Close orders are orders to buy or sell equities at or near the market closing price. Note: Specific Exchange''' + 's Closing Prices may differ." row="6" column="1" height="3" /> </OrderType> <OrderType name="Arrival Price"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="1" column="3"/> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="1" column="4" /> <UserControl name="Description" enabled="1" Default="Seeks to minimize the difference between the average price and the arrival price." row="1" column="6" height="4" /> </OrderType> <OrderType name="Hidden"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Min Qty" enabled="1" Default="" required="0" row="1" column="3" /> <UserControl name="Description" enabled="1" Default="The algorithm sweeps liquidity at the limit price or better when sufficient liquidity is available. Nothing is ever posted on an exchange or ECN." row="1" column="6" height="6" /> </OrderType> <OrderType name="If Touched"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Trigger Price" enabled="1" Default="0.01" required="1" row="1" column="3" /> <UserControl name="Min Qty" enabled="1" Default="" required="0" row="1" column="4" /> <UserControl name="Description" enabled="1" Default="Executes orders at the time the trigger price is reached. The original If Touched order is never disclosed." row="1" column="6" height="5" /> </OrderType> <OrderType name="Peg (Fixed)"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Peg To (Fixed)" enabled="1" Default="Fixed" required="1" label="Peg To" row="1" column="3" /> <UserControl name="Peg Diff" enabled="1" Default="0.01" required="0" row="1" column="4" /> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="1" column="5" /> <UserControl name="Description" enabled="1" Default="Maintains a specified quantity at fixed price. The algorithm is used when the trader wants to maintain a position relative to the inside market without closely monitoring it." row="1" column="6" height="8" /> </OrderType> <OrderType name="Peg (Dynamic)"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Peg To (Dynamic)" enabled="1" Default="Last" required="1" label="Peg To" row="1" column="3" /> <UserControl name="Peg Diff" enabled="1" Default="0.01" required="0" row="1" column="4" /> <UserControl name="Description" enabled="1" Default="Maintains a specified quantity at a floating price relative to a reference price. The algorithm allows the trader to maintain a position relative to the inside market without closely monitoring it." row="1" column="6" height="8" /> </OrderType> <OrderType name="POV"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="% Volume" enabled="1" Default="50" required="1" row="1" column="3" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="1" column="4"/> <UserControl name="Description" enabled="1" Default="An inline with volume strategy that attempts to purchase or sell a quantity of stock equal to a user-specified percentage of the total volume traded at the limit price or better." row="1" column="6" height="8" /> </OrderType> <OrderType name="Stop"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Min Qty" enabled="1" Default="" required="0" row="1" column="3" /> <UserControl name="Description" enabled="1" Default="Generates an order to buy or sell when the stock trades at the stop price." row="1" column="6" height="4" /> </OrderType> <OrderType name="Tandem"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Benchmark ID" enabled="1" Default="" required="0" row="1" column="3" /> <UserControl name="% Volume" enabled="1" Default="50" required="1" row="1" column="4" /> <UserControl name="Min % Volume" enabled="1" Default="1" required="0" row="1" column="5" /> <UserControl name="Max % Volume" enabled="1" Default="100" required="0" row="2" column="1" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="2" column="2"/> <UserControl name="Reference Price" enabled="1" Default="Last" required="1" row="2" column="3" /> <UserControl name="Strategy Style" enabled="1" Default="Value" required="1" row="2" column="4" /> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="2" column="5" /> <UserControl name="Description" enabled="1" Default="The algorithm automatically adjusts its participation based on relative price movements of the target security versus the benchmark security." row="1" column="6" height="7" /> </OrderType> <OrderType name="Trailing Stop"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="Peg Diff" enabled="1" Default="0.01" required="1" row="1" column="3" /> <UserControl name="Min Qty" enabled="1" Default="" required="0" row="1" column="4" /> <UserControl name="Description" enabled="1" Default="A trader sets a stop price that floats with the target security''' + 's price in one direction but not the other. The algorithm allows the trader to easily lock in gains and limit losses." row="1" column="6" height="8" /> </OrderType> <OrderType name="TWAP"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="% Volume" enabled="1" Default="50" required="0" row="1" column="3" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="1" column="4"/> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="1" column="5" /> <UserControl name="Description" enabled="1" Default="Time Slicing order strategy that aims to execute an order evenly over a user-specified time period." row="1" column="6" height="5" /> </OrderType> <OrderType name="Vector"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="% Volume" enabled="1" Default="50" required="1" row="1" column="3" /> <UserControl name="Min % Volume" enabled="1" Default="1" required="0" row="1" column="4" /> <UserControl name="Max % Volume" enabled="1" Default="100" required="0" row="1" column="5" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="2" column="1"/> <UserControl name="Reference Price" enabled="1" Default="Last" required="1" row="2" column="2" /> <UserControl name="Strategy Style" enabled="1" Default="Value" required="1" row="2" column="3" /> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="2" column="4" /> <UserControl name="Description" enabled="1" Default="The algorithm automatically adjusts its participation rate based on price movements of the target security." row="1" column="6" height="5" /> </OrderType> <OrderType name="VWAP"> <UserControl name="Start Time" enabled="1" Default="" required="0" row="1" column="1"/> <UserControl name="End Time" enabled="1" Default="03:59:59 PM" required="0" row="1" column="2"/> <UserControl name="% Volume" enabled="1" Default="50" required="0" row="1" column="3" /> <UserControl name="Execution Mode" enabled="1" Default="Neutral" required="0" row="1" column="4"/> <UserControl name="Completion Price" enabled="1" Default="0.01" required="0" row="1" column="5" /> <UserControl name="Buyback" enabled="1" Default="No" required="0" row="2" column="1" /> <UserControl name="Description" enabled="1" Default="Deliver an average price close to the VWAP (Volume Weighted Average Price) while minimizing manual intervention and impact to the VWAP itself." row="1" column="6" height="7" /> </OrderType> </Desk> </Broker> <Broker name="CSFB"> <Contact value="CSFB Electronic Trading"/> <Telephone value="800-867-5309"/> <Email value="support@csfb.com"/> <ExternalAccountFIXTag value="1" /> <Colors background="120,152,179" text="38,92,128"/> <Desk name="CASH"> <FGTags value="s.57=CASH"/> </Desk> </Broker> <Broker name="BOFA"> <Contact value="BOFA Electronic Trading"/> <Telephone value="800-867-3333"/> <Email value="support@bofa.com"/> <ExternalAccountFIXTag value="1" /> <Colors background="212,0,26" text="0,82,194"/> <Desk name="CASH"> <FGTags value="s.57=CASH"/> </Desk> </Broker> <Broker name="TWPT"> <Contact value="TWPT Electronic Trading"/> <Telephone value="800-867-5311"/> <Email value="support@twpt.com"/> <ExternalAccountFIXTag value="1" /> <Colors background="0,105,64" text="255,255,255"/> <Desk name="CASH"> <FGTags value="s.57=CASH"/> </Desk> </Broker> <Broker name="SALI"> <Contact value="SALI Electronic Trading"/> <Telephone value="800-867-5443"/> <Email value="support@sali.com"/> <ExternalAccountFIXTag value="1" /> <Colors background="67,41,10" text="171,169,69"/> <Desk name="CASH"> <FGTags value="s.57=CASH"/> </Desk> </Broker></BrokerProfile>'GOEXEC sp_dboption 'ConfigDB', 'select into/bulkcopy', 'false' |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2009-04-02 : 12:31:35
|
Please do not cross post:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=123070 |
|
|
|
|
|
|
|