SQL Server Performance

Query XML contents in SQL Server 2000

Discussion in 'General Developer Questions' started by shaniirfqn, Nov 19, 2009.

  1. shaniirfqn New Member


    I am using the SQL Server 2000 as RDBMS.. I am tasked todevelop an application which is supposed to handle user'scomments/notes on many different web sites. Each site has its ownspecific data which uniquely identify the notes/comments entered on it.So, i must store that specific data in my database's table. The problemis that the site specific data is undefined. It could be anything.So, iam not aware about the structure of the specific data. I decided tokeep the site specific data into XML. So, I developed a table likebelow,

    NoteID INT
    Note VARCHAR(1000)
    ApplicationID VARCHAR(10)
    UserID VARCHAR(10)
    CreateDate DATETIME
    ModifiedDate DATETIME
    Parameters VARCHAR(1000)

    Parameters column actually stores the site specific data in form of XMLe.g.'<parameters><profileid>1796</profileid><state>page2</state></parameters>'........

    I would pass a parameter to my stored procedure from my application.This parameter encloses the search criteria for the site specific datain form of XML too. For example, I would pass'<parameters><profileid>0001</profileid><state>unknown</state></parameters>'. Rest of the parameters like ApplicationID would pass in a standardway like we do in normal cases. :) So, enough explanation i think, letscome to the point,

    How could i query the specific elemente.g. profileid, within stored procedure by following the abovearchitecture so that application must be able to render the correctnotes/comments on the client? Any help would be highly appreciated.

  2. FrankKalis Moderator

    Why does it need to be SQL Server 2000?
    The XML support has been greatly improved in SQL Server 2005.

Share This Page