none
would like to update table RRS feed

  • Question

  • hi,

    i wanted to update a table columnsand  want to apply trim and data  type convert also over those columns.In terms of 1  query sql server 2005

    Sunday, April 21, 2013 10:52 AM

Answers

  • Hi,

    try like below example,

    use the update statement inside Execute SQL Task,

    CREATE TABLE TEST_SSIS (Column1 VARCHAR(50))
    INSERT TEST_SSIS SELECT ' trim,update,convert ' 
    UPDATE TEST_SSIS SET Column1 = CONVERT(NVARCHAR(50),(LTRIM(Column1)))
    SELECT * FROM TEST_SSIS

    Execute SQL Task - http://msdn.microsoft.com/en-us/library/ms141003.aspx

    Post your DDL ,if you need any specific help ...


    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.

    Sunday, April 21, 2013 12:19 PM
    Moderator

All replies

  • i wanted to update a table columnsand  want to apply trim and data  type convert also over those columns.In terms of 1  query sql server 2005
    Sunday, April 21, 2013 10:46 AM
  • Hi,

    try like below example,

    use the update statement inside Execute SQL Task,

    CREATE TABLE TEST_SSIS (Column1 VARCHAR(50))
    INSERT TEST_SSIS SELECT ' trim,update,convert ' 
    UPDATE TEST_SSIS SET Column1 = CONVERT(NVARCHAR(50),(LTRIM(Column1)))
    SELECT * FROM TEST_SSIS

    Execute SQL Task - http://msdn.microsoft.com/en-us/library/ms141003.aspx

    Post your DDL ,if you need any specific help ...


    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.

    Sunday, April 21, 2013 12:19 PM
    Moderator