Solved

Derived column expression meaning in ssis

Posted on 2011-03-21
2
474 Views
Last Modified: 2012-05-11
Please let me know the actual purpose, I am trying to understand from an existing package
1)ISNULL(ESN) ? (DT_WSTR,50)"Accessories" : "Phone"

2)(DT_DBTimeStamp)((SUBSTRING((DT_WSTR,8)[Receive Date],5,2) + "-" + SUBSTRING((DT_WSTR,8)[Receive Date],7,2) + "-" + SUBSTRING((DT_WSTR,8)[Receive Date],1,4)))

3)ISNULL(ESN) ? REPLACE(SKU,SUBSTRING(SKU,1,FINDSTRING(SKU," ",1)),"") : SKU
0
Comment
Question by:sqlcurious
2 Comments
 
LVL 7

Accepted Solution

by:
lozzamoore earned 500 total points
ID: 35188112
1) If the ESN field is null, then return "Accessories", otherwise return "Phone".

2) Manufacture a datetime string in the format: DD-MM-YYYY (or could be MM-DD-YYYY depending on the original format) setting DD as 5th and 6th characters, MM as 7th and 8th characters, and YYYY as the 1st 4 characters from the "Receive Date" column.

3) If the ESN field is null, then return the first part of the SKU field up to the space, otherwise return the whole field.
0
 

Author Closing Comment

by:sqlcurious
ID: 35191839
thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question