Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Derived column expression

$
0
0

Hello fellow developers,

I need help determining the meaning of an expression in SSIS using the Derived Column tool. I am trying to fix an error in a SSIS package that was created by a previous developer. I need help understanding what the following expression is accomplishing and to create the expression is SQL.

(LEN(TRNFC#) == 10) ? (DT_WSTR,8)((DT_WSTR,4)((DT_I4)SUBSTRING(TRNFC#,7,4)) + "_" + (DT_WSTR,3)TRNVSEQ) : (DT_WSTR,8)"0-0"

A sample of the data in field TRNFC# before being altered looks like this: 3579000017

A sample of the data in field TRNVSEQ before being altered looks like this: 0

A sample of the result data is 17_0

What would be this expression in a SQL select statement?

Thanks in advance!


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>