[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

SSIS Derived Column Expression

Posted on 2010-03-24
2
Medium Priority
?
931 Views
Last Modified: 2013-12-20
Hi,

I am trying to run this inside the SSIS Derived Column Expression, but it doesn't work.
DATEDIFF("d", [date1],[date2]) > 14 ? "(Start " + (DT_WSTR) DATEDIFF("d", [date1],[date2])+ " End)" : NULL(DT_WSTR,10)

Can you please tell me what's wrong?

0
Comment
Question by:alcsoft
2 Comments
 
LVL 21

Accepted Solution

by:
Alfred A. earned 500 total points
ID: 28523498
Hi,

You forgot to put the column size of the first DT_WSTR

DATEDIFF("d", [date1],[date2]) > 14 ? "(Start " + (DT_WSTR,10) DATEDIFF("d", [date1],[date2])+ " End)" : NULL(DT_WSTR,10)
0
 

Author Closing Comment

by:alcsoft
ID: 31706812
Oh.. My bad, thanks
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Suggested Courses

607 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