Getting Started with Adobe After Effects - Part 6: Motion Blur
Ask
Ask questions, discuss or help others by answering
Related Posts · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

Top Categories · View All
SQL Server 141
TSQL 75
SSRS 70
SSIS 66
XML 54

please convert into SSIS

Apr 30 2012 12:00AM by Anil   

Dear, please convert into SSIS
REPLICATE('0',16-len(CONVERT(VARCHAR,@TERMINALID))) + CONVERT(VARCHAR,@TERMINALID)

my input: 12345 Expected Output: 0000000000012345

Submitted under: Microsoft SQL Server · SSIS - SQL Server Integration Services ·  ·  · 


Anil
274 · 0% · 156

4 Replies

  • Option one: RIGHT ( ("0000000000000000" + @[User::TERMINALID] ), 16)

    OR

    RIGHT ( (REPLICATE("0",16) + @[User::TERMINALID] ), 16)

    Assuming that the TERMINALID is a variable, if not and it is a column name, Use just RIGHT ( ("0000000000000000" + TERMINALID ), 16)

    Point to note, expressions are case sensitive for column or variable names.

    commented on Apr 30 2012 3:05PM
    Sudeep Raj
    12 · 13% · 4287
  • Hi Sundeep, its not working and my data having spaces Input: 12345spacespacespacespace...... expected Output:0000000000012345

    commented on May 1 2012 1:53AM
    Anil
    274 · 0% · 156
  • If you have spaces use LTRIM(RTRIM(TERMINALID)) in place of the variable or column name. Also what is the error that you are getting.

    You need to give more detail... is it a column or a variable... what is the error, any other information..

    commented on May 1 2012 2:08AM
    Sudeep Raj
    12 · 13% · 4287
  • thanks lot sandeep, i got answer using LTRIM &RTRIM

    commented on May 1 2012 2:16AM
    Anil
    274 · 0% · 156

Your Reply


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]