Solved

SSIS Expression converted from SQL

Posted on 2013-06-28
2
632 Views
Last Modified: 2016-02-11
Hi I am very new to SSIS and I have a derived column that I want to use an expression to set the date,  I have the following SQL statement,  how do I convert to SSIS

(CAST(CONVERT(CHAR(8), getdate(), 112) AS DATEtime) ) -88
0
Comment
Question by:knamc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 49

Accepted Solution

by:
PortletPaul earned 500 total points
ID: 39286231
dateadd(day,-88,dateadd(day, datediff(day,0, getdate() ), 0))

SSIS dateadd
http://msdn.microsoft.com/en-us/library/ms141719.aspx
SSIS datediff
http://msdn.microsoft.com/en-us/library/ms139927.aspx

try to avoid conversion to varchar if you can, it is slower than using date functions
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 39289148
(DT_WSTR,4)YEAR(GETDATE()) + RIGHT("0" + (DT_WSTR,2)MONTH(GETDATE()), 2) +  RIGHT("0" + (DT_WSTR,2)DAY( GETDATE()), 2)
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

From time to time, for debugging and troubleshooting your flow at run time you’ll need to check if the variable has the correct value or not, there’re several ways to check for the value of the variables inside the flow, You can add Break Points, a …
Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

635 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