How To Modify Xml Content In SQL 2000

Jan 14, 2008

Hi
I have developed a sql procedure for updating some xml content using SQL 2005 xQuery features.
For example:
Declare @xmlContent = '<books><book name="asp"/>< book name = "sql"/></books>'
--Now I want to add attribute "book_id" to the xml content.
SET @xmlContent.modify('insert attribute book_id{"1" } into (/books/book[@name="asp"])[1] ')
SET @xmlContent.modify('insert attribute book_id{"2" } into (/books/book[@name="sql"])[1] ')
SELECT @xmlContent

--OUTPUT will be
<books><book name="asp" book_id="1"/><book name="sql" book_id="2"/></books>

QUESTION

Q1. Do we have any extension or plugin such that this SQl 2005 xquery feature can be incorporated in SQL 2000?
Q2. If the answer for Q1. is no (as I expect), then do we have any TSQL feature in SQL 2000 for modifying xml content?
I found all examples in SQl 2000 related with "openxml" function which performs the select kind of operations only. Like selecting data in XML format OR converting xml data in to tabular format. But I couldn't find any xml modification TSQL in SQl 2000 which can add element/attributes or change values.
one workaround could be to consider xml content as string and use string functions to modify the content.But is there any more sensible approach available in SQL 2000?


 
 
 

View 1 Replies


ADVERTISEMENT

Query For Content In Varchar(2000)

Nov 12, 2007


I have a column with datatype varchar(2000). When I use the select statement to query for this column I only can see the content up 256 characters. How can I query to view the entire string above 256 characters?

Thanks.

View 5 Replies View Related

SQL Vs XML Page Content

Apr 2, 2008

I want to create the most effective way (google) to have content displayed on a web page. 
Currently, we are updating to SQL and populating to web via calling SQL statements hardcoded to page.  I want to know if this is ok to do, or should we be reading from a static XML file that is updated? 
 I think the XML is the way to go being that i may have answered my own question, but i was curious to what the experts on asp.net had to say.
Thanks,Nick

View 9 Replies View Related

Moving Content From One Db To Another

Mar 9, 2007

an outside developer has sent us a mdf file that contains the need updates to a database.

here is where the problem comes in, how can i append the contents of the mdf file to an existing db?

there are about a dozen tables, 50 stored procs, and one new user.

View 2 Replies View Related

How To Store A Content Into Database

Aug 22, 2006

Hi everyone,
 
I'm just using TEXTBOX control to save data into my DB. My question is, if I have multiple lines of sentences, it does not store as what it looks like. For example;
 
Hello, Mike
 
It stores into the database as "Hello, Mike" and if I read from the database, it does not have seperate lines and shows it like this;
Hello, Mike
 
How can I store the contents into database and make the contents as original? (Sorry for the poor English, but I hope you understand it.)

View 2 Replies View Related

Automatic Content Expiry

Jun 21, 2007

Hi All,I have a job coming up which involves me creating a  vacancy system for our website.I (think) I'll only need one table:ID (PK)JobTitleJobLocationSalaryHoursJobDescriptionValidFrom (Date/Time)ValidTo (Date/Time)I'll display this data using a C#.Net repeater but I was wondering how I can automatically strip the page of the jobs that have gone past their expiry date? Is is straightforward to achieve?Thanks in advance,Brett 

View 2 Replies View Related

SQL Server As Content Store

Dec 29, 2003

Okay, moving to developing a small site that will be storing articles - that is a site largely consisting of html marked up articles with images. We already have an SQL Server so it is becoming the back-end.

So, since I'm not an SQL Server expert, some general advice on this would be appreciated? The articles, as I say in HTML (largely just markup for titles, and general text) would be stored in the DB? As Text datatypes?

How about the images...on disk or in SQL?

View 3 Replies View Related

Cannot Able To See The Content Of A Column In A Table?

Nov 12, 2001

hi everybody,

The problem is, I have a table with one column of varchar(8000) datatype. It has got 1000's of records. Through Query Analyzer, I am not able to view my records after 257 columns in my table, even I increased my textsize by using 'set textsize' command.

Any other setting is available to correct this. Any help is appreciated.

thanks,
Vasu

View 2 Replies View Related

Table Empty Of Content

Sep 10, 2001

I have a particular production database that on a few recent occasions has suddenly had one of it's tables empty of content. Now there are no jobs or triggers in place neither is any stored procedures that could perform a delete or alter table operation in place. The permissions have been set not to allow this either. The datatype is text only. What is intriguing is the QA server has an exact mirror and this dosen't happen. Has anyone come across this sort of phenomenon?

View 2 Replies View Related

Field Content Alteration

Feb 24, 2000

Hello,

I have a field in a table called 'CourseId' - the course Id should always contain a backslash somewhere in the list of numbers eg :

12342322
11231131

Unfortunately, some of the course Ids have a forward slash instead of a backslash eg :

462322/1
23/232323

How can I update the field to replace the / with a

Any help is very much appreciated.

Thanks in advance,

Anthony

View 1 Replies View Related

How Can I Read The Content Of Transaction Log

Oct 30, 2006

How can I read the content of transaction log?

View 2 Replies View Related

How To Extract Content From Email

Feb 22, 2012

I want some way to extract email content from email that we send/receive in account.....

This question is in context to Text Analytic

View 4 Replies View Related

Content Of Sp From System Tables

Jun 4, 2008

Hi,

Anyone plz do tell me what s the query to see the text content of stored procedure from system database tables..

from which table we get the content of sp


Thanks & Regards

ARV

View 9 Replies View Related

What Express Content Do You Want MS To Provide?

Dec 14, 2005

Folks,

I'm the project lead for SQL Server Express in Microsoft (as well as owning the Storage Engine). I'm going to make sure that threads on this forum get answered - I see a bunch with no answer so far.

Now to the point - we’re in the process of assessing the content that exists to help people learn and use SQL Server Express. This includes demos, tutorials, whitepapers, Webcasts, Starter Kits, and any other type of content you could imagine. So this is a great chance to TELL US WHAT YOU WANT! We’ll integrate your feedback and make sure that we try and address the most requested areas of content. Please be as specific as you can.

Thanks in advance for your feedback.


Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)

View 9 Replies View Related

Field Content Reversal

Apr 9, 2007

I have a field 'LastName' in a SQL 2000 table 'customers' that is populated with all our customer's full names in this order:

Smith John M

I need to flip the information around so that it can be exported into a CSV file for an automated email notification program to notify them their items are in and having it in first, last, MI format is much more professional.

I've been playing with charindex and stuff routines and am spinning my wheels. Is there a canned routine for something like this - this must have been done a hundreed times out there in SQL somewhere (or it's so easy to do that everyone (but me) just cranks it from scratch).

Thanks in advance for your help.

ronanpcs

View 8 Replies View Related

Content OF Stored Procedure ??

Mar 31, 2008

Hi ,

Cay anyone tell me where is the content of Stored Procedure
stored in the database.. in which table


Thanks & Regards

Arv

View 12 Replies View Related

Merge Database Content

Jul 23, 2005

hi,i have a sqlserver CE and a sqlserver database.The tables are exactly the same on both databases.the sqlserver CE database Content will be synchronized with thesqlserver database with insert orders..is there a way to merge the two databases?this would be great cause different content will be inserted in bothdatabases. After a synchronisation both databases should have the samecontent..i hope you understood my problem. my english is not very well..christian

View 1 Replies View Related

Formatting Database Content

May 16, 2006

HiI have set up a SQL database to contain alist FAQ's for our company andthen plan to pull this info off using a web page.So far I have entered the data but I am unable to control how it isdisplayed inside SQL ie I cannot enter new blank lines I have triedusing lots of spaces but this does not work when I use the website todisplay the info.Is there a way of formatting and editing the data in the sql databaseas I am unable to do this, if I try to edit the data in the database Ihave to copy it to notepad delete what is in the database, edit thetext in notepad then paste it back in.There must be a better way.Please helpalamb200

View 8 Replies View Related

Web Content Database. Is There A Limit?

Jul 20, 2005

HiI've developed a simple web service that lets people easily set up their ownwebsites, and keep them up-to-date themselves.I'm storing all the content, including images in the SQL 2000 database. Sofar it's working well enough. Is there likely to be a performance orreliability problem as the system grows?You can see it in operation here: www.up-to-the-minute.comIt's early days and any comments and ideas are welcome.John SouthPangbourne UK

View 1 Replies View Related

Best DataType For Content System

Jul 20, 2005

Hello,On our corporate website, we will be using email notifications forvarious things. I would like for our marketing guy to be able to editthe email templates over the web so that I don't have to keep updatingthem myself for every little change. I want to store the templateswithin the database (since they will be small). The templates will beHTML based and not more than a few thousand bytes in length. Should Iuse a VARCHAR or VARBINARY, or what? I would assume VARCHAR, but I'mnot sure.Thanks,Will

View 1 Replies View Related

Combining The Content Of Two Tables

Sep 20, 2007

Hi all,

How can I combine the contents of the two tables below? The combination result of these tables is provided below. Thanks

Table A
Client Weight Purchase
Tom 10 2
Bill 4 2
John 3 2

Table B
Client Weight Purchase
Jim 2 5
Lee 4 3
Bob 6 7

Combination table (result)

Client Weight Purchase
Tom 10 2
Bill 4 2
John 3 2
Jim 2 5
Lee 4 3
Bob 6 7

View 3 Replies View Related

MCMS Content Inventory

Jun 29, 2006

Hi,

I would like to know how does CMS stores content inventory in SQLserver.?

Example-If I create or migrate an application to CMS in sqlDB how does information is stored ?

Regards

T.Gunaseelan

View 4 Replies View Related

Evaluating String Content

Jun 12, 2006

Our Business partners request me to read the field names from a SQL table dynamically so that my SSIS package will not get impacted if Web Service hosts make a change.

Is there a way to evaluate a string at runtime that contains a field name ?

Thanks,

Gulden 

View 6 Replies View Related

Copy Content Of Txt File

Nov 6, 2006

Hi Guys,

What approach should I use to copy content of a text file. Is BCP capable of doing this? How about SSIS?

Example of the text file's content:

Date, "20060101"
ST_Code, "101"
A_Code, P_Code, T_Code, amount, price
"0001", "1111", "0101", 550, 230
"0002", "1111", "0102", 345, 122
"2001", 0212", 0930", 410, 90

In the example above, I just want to copy the rows Date, "20060101" and ST_Code, "101" into a table.



Regards,

Lars

View 2 Replies View Related

SQLLDR Content Of The Log File

May 10, 2008

HI,
We are using SQLLDR to send data from SQL Server to Oracle database. This utility creates a log file. I want to know whether there is a provision to change the contents of the file. We use this utility in multiple SQL Servers to send the data to the same Oracle Server. Can we add the source server name in the file so that identifying which server does a particular log file belong to? How?

Help would be greatly appreciated. Thanks a lot..

Manoj Deshpande.

View 3 Replies View Related

Example Of How To Retrieve The Error Log Content

Apr 9, 2008

Hello,

several days ago I've seen a sample code from Books Online which retrieves the content of error log as a rowset using a single SELECT statement. But now I can't find that article. Instead of this I've found the stored proc sp_readerrorlog which is undocumented. So I'd prefer the using of documented approach. Has anyone seen that article? Please remind me its location if so.

Thanks,
Yuriy

View 6 Replies View Related

Filtering The Parameter Content

Apr 18, 2007



Hello,



I have built a report using a Cube (and not a relational database).



I have a date as a parameter and I would like to filter its content: the parameter goes from 1900 to 2090 and I would like the user to see only from 2006 to 2090.



Can you help me by giving me tricks to do it ? There may have several ways of doing it but I can't find them.



Thank you in advance !

Alexis







View 3 Replies View Related

Copying Schema And Content

Jul 19, 2006

I am trying to copy the tables, relationships, and data of a logical database...

From: a logical database in SQL Server 2005, where I have instance-wide system admin privileges (supreme power)

To: a pre-existing logical database in a different SQL Server 2005 instance, where I merely have "database owner" privileges to that logical database (I have no "instance-wide" privileges).

This is a one-time effort (as opposed to nightly). I have found a way to reproduce the tables and relationships ("generate scripts", then run the script on the new server). I have also found a way to export/import the data. But I have not found a way to effectively do both. In other words, if I create the tables and relationships, and then attempt to import the data, I get tons of relationship violations, because the data is not being imported in a "dependency-sensitive" order or fashion.

So can somebody tell me how to do this, or tell me what I'm doing wrong? Remember, I do not have "Create Database" rights on the destination server - so I can't use the "Copy Database" command (darn). Any help?

View 3 Replies View Related

Limiting Content Of Progress Tab

Jul 4, 2007

Is there any way to limit the content that is placed into the Progress Tab during execution of a package in debug mode?



My problem is that I have a complex package that puts lots of info in there. This package is called in a loop from another package. Each time the package is called, the new info is added to the existing info in the Progress Tab. Eventually the instance of Dev Studio hangs when it gets too much content in that screen.



The only solution would be if I can limit the output content of that screen or turn it off.



All suggestions appreciated.

View 13 Replies View Related

Can Save Labels To The DB But Not The Content Of DropDownLists !

Jul 28, 2007

hi there, i have a payment page which uses javascript to calculate payments and what remains etc. That all works fine, the problem i have is that when you are finished and you go to the next page it should save all of the records to the order table where the order_id = a querystring. Now i have tried using an insert method and an update method, not really sure whats the difference when putting data into an existing record. What happens though is that i can save the contents of labels etc but it wont save the content of dropdown lists (of which there are 2) i just cant work it out, i have posted my code below
 string strOrderID = Convert.ToString(Request.QueryString["OrderID"]);
string strDiscountPercent = Convert.ToString(5656);double dblDiscountMoney = Convert.ToDouble(txtDiscountMoney.Text);
string strPaymentMethod1 = ddlPaymentMethod1.SelectedValue;double dblPaymentAmount1 = Convert.ToDouble(txtPaymentAmount1.Text);
string strPaymentRecipt1 = txtPaymentRecipt1.Text;string strPaymentMethod2 = ddlPaymentMethod2.SelectedValue;
double dblPaymentAmount2 = Convert.ToDouble(txtPaymentAmount2.Text);string strPaymentRecipt2 = txtPaymentRecipt2.Text;
 string sConnectionStringCustInfo = "my connection string";
SqlConnection objConnOID = new SqlConnection(sConnectionStringCustInfo);
//This is the sql statement.using (objConnOID)
{
objConnOID.Open();
 string sqlUpDate = "UPDATE tbl_order SET discount_Percent = " + txtDiscountPercent.Text +
", discount_money = " + dblDiscountMoney + ", payment_method1 = " + strPaymentMethod1 +   =========== this is the problem line here!
", payment_amount1 = " + dblPaymentAmount1 + ", payment_ref1 = " + strPaymentRecipt1 +
", payment_amount2 = " + dblPaymentAmount2 +", payment_ref2 = " + strPaymentRecipt2 +
 
"WHERE order_ID = " + strOrderID;
 
 
 
SqlCommand objCmd1 = new SqlCommand(sqlUpDate, objConnOID);
 
try
{
 
objCmd1.ExecuteNonQuery();
}
 
and because it throws an error it wont update the database with any other record. does anyone have any ideas, i have spent hours last night trying to figure this one out and im sure its simple! but i need some help!
 
Cheers
Jez

View 5 Replies View Related

How To Order By A Portion Of A Cell Content?

Aug 5, 2007

Hi all,
i've problem with creating a select to order by a column where i will use a specific part of the cell content.
The rows ar looks a follows
ID | Titel                          | Ausgabe | Seite | kurzInfo........                   5  | 3 Must-have-tools       | 01/2006  | 32     | Oft sind es die......  6  | RowID in DataControl   | 06/2005  | 11     | Gott sei Dank muss .....
now im looking for a solution to sort by the column [Ausgabe] but by the part after the slash so it looks like
........ | Ausgabe | Seite | ................| 06/2005  | 11     | ................| 01/2006  | 32     | .......
 Is this possible without a sub select?
 
Thanks for any help.
 
 

View 5 Replies View Related

What Datatype Is Best For Storing HTML Content

Apr 16, 2008

What datatype is best for storing HTML content?
nText or Nvarchar(MAX) or ?

View 3 Replies View Related

How Do I Write Content In A Table To File

Mar 20, 2002

I know oracle uses UTL_FILE procedures lik putline, but microsoft?
Thank you for trying to help.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved