multiple column from one thorugh drived column

pat dev 1 Reputation point
2021-04-14T17:55:30.177+00:00

Hello,

I need help to convert column in to multiple column how can i use in derived column or something..
wanted to use following loging"
hightinfeet: cast(Ieft(heignt,1)*12.00) as decimal (7,3))
hightininch:
(
case isnumeric(replace(right(height, len(height)-2, ' " ', ''))
When 1 then convert (decimal(7,3),replace(right(height,len(height-2), ' " ', ' ' ))
else 0
end
)

eg: height

data
64
511
611
65
Thanks

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,452 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Monalv-MSFT 5,891 Reputation points
    2021-04-15T07:00:34.51+00:00

    Hi @pat dev ,

    We can use Derived Column and Conditional Split to get the desired output in ssis package.

    Please refer to the following expressions and pictures:

    88094-df.png

    88006-derivedcolumn0.png
    hightinfeet
    (DT_NUMERIC,7,3)(((DT_I4)LEFT(height,1)) * 12.00)

    CheckISNULL
    LEN(REPLACE(RIGHT(height,LEN(height) - 2)," '' "," "))

    88070-conditionalsplit.png

    88111-derivedcolumn1.png
    hightininch
    (DT_NUMERIC,7,3)(REPLACE(RIGHT(height,LEN(height) - 2)," '' "," "))

    88103-derivedcolumn2.png

    88083-output.png

    Best regards,
    Mona

    ----------

    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.