Update text column

  • Hi I am trying to Update a text column in a table and Normal update is not working, so can some one help me out in writing an update statement,

    CREATE TABLE [dbo].[frWorkflow](

    [WorkFlowID] [uniqueidentifier] NOT NULL,

    [WorkflowDefinition] [text] NOT NULL,

    [IsDeleted] [char](1) NOT NULL,

    [RecordingUserName] [varchar](25) NOT NULL,

    [RecordingTime] [datetime] NOT NULL,

    [RowVersion] [int] NOT NULL,

    CONSTRAINT [PK_frWorkflow] PRIMARY KEY CLUSTERED

    (

    [WorkFlowID] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

    update frWorkflow set WorkFlowDefinition = '<Workflow> <Definition><ns0:ShashiFailureWorkflow x:Name="TestFailureWorkflow" HasErrors="False" JobParameterString="Nothing" Exception="{x:Null}" xmlns:ns1="clr-namespace:FileOneFramework.JobManager.WorkflowActivities;Assembly=FileOneFramework.JobManager.WorkflowActivities" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ns0="clr-namespace:FileOneFramework.JobManager.Workflows;Assembly=FileOneFramework.JobManager.Workflows"> <ns1:TestFailureActivity x:Name="testFailureActivity1" Description="This is a test activity that will throw an error." /> </ns0:TestFailureWorkflow></Definition> <Rules /> </Workflow>'

    where WorkFlowID = 'FB9C894D-5476-401D-BE95-086AF4528E52' and rowversion = 26

  • Opps I found the mistake...

  • Cool! Tell us what it was please?

    Also, if you're using SQL Server 2005 (this is a 2005 forum), why don't you convert the TEXT column to a VARCHAR(MAX) column and call it a day?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • Most excellent suggestion Jeff. The update will need to happen at some point anyway with Text going away in a future release.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply