473,418 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

sql replace function for xml type column

msjonathan
I have a column "XML" as type xml in my database. And I want to replace some xml parameters.
and I did this:
Expand|Select|Wrap|Line Numbers
  1. update core.Desktops
  2. set [xml] = replace(CAST([XML] as nvarchar(max)),
  3. '<property name="Name">colDepartments</property>
',
  4. '<property name="ColumnEditName">repDepartments</property>
')
and it does not work, when I change the type of my column to text, or nvarchar it works. So I think it's all about the casting/ type of column.

Do you have any tips to avoid this, a workaround, ....?

I added the xml example in attachment.
Attached Files
File Type: txt xmlExample.txt (243.9 KB, 593 views)
May 26 '10 #1
1 6205
I found my problem , nvarchar(max) is only 8000 characters long. And the xml column exists out of 32000 characters. has anyone a solution for this problem, I can't cast xml to text.

Edit: I was wrong varchar has a max of 8000, nvarchar has enough of characters
May 26 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Not Me | last post by:
Hi, I'm having bother with the replace function in access 2002, a while back I remember not being able to get it to work... then suddenly the next time I tried it did work. Now it doesn't...
3
by: Dave | last post by:
I have an Access 2K application that is distributed to about a dozen users (all with identical NT environments and identical Access versions, object libraries and service packs). I am using the VBA...
3
by: Andy Sutorius | last post by:
Hi, I read the thread (2/16/05) regarding a replace function in C# however it didn't answer my question. I have a string which is building an insert sql statement and I would like to replace...
4
by: Cor | last post by:
Hi Newsgroup, I have given an answer in this newsgroup about a "Replace". There came an answer on that I did not understand, so I have done some tests. I got the idea that someone said,...
4
by: Lauren Wilson | last post by:
Hi folks, We have a need to replace sub strings in certain message text. We use the Office Assistant to display help and often use the imbedded formatting commands. Those of you who have used...
10
by: localpricemaps | last post by:
i have some html that looks like this <address style="color:#">34 main,<br> Boston, MA</address> and i am trying to use the replace function to get rid of the <Br> that i scrape out using...
1
by: sck10 | last post by:
Hello, When I open a FormView in View mode, the line breaks are missing, but they show up when I enter edit mode. So I tried to use the following on a Textbox with a replace function, but got...
0
by: haukenpo | last post by:
Does anyone has solution for having a similar replace() function on datatype text column? I wish to replace a string with another string in a datatype TEXT column on MSSQL2000. The following...
1
by: seanmatthewwalsh | last post by:
Hi I have a website that uses an Access 2003 database. I have controls on my pages that are bound to SqlDataSources that pull data from this database. In a couple of them, I need to use the...
2
by: ArunDhaJ | last post by:
Hi, I'm having a DataTable with a column named "Phones" having value like (901) 789 1234<BR>(901) 789 1235<BR>(901) 789 1221 I need to perform filtering based on the phone number of the form...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.