Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
SSIS Expressions
SSIS Expressions
Rate Topic
Display Mode
Topic Options
How to write an DATEDIFF @ DATEDIFF function inside a Derived column of an SSIS Package. Im trying to have this both this functions as an expression in a...
Poll Results
Votes
How to write an DATEDIFF @ DATEDIFF function inside a Derived column of an SSIS Package. Im trying to have this both this functions as an expression in a derived column."DATEDIFF(MONTH,con.commencement_date,@EndDate) AS 'Months In Force'" - "commencement_date BETWEEN DATEADD(MONTH,-6,GETDATE()) A
100%
3
Member Votes: 3, Anonymous Votes: 0.
You don't have permission to vote within this poll.
Author
Message
nthetengm
nthetengm
Posted Thursday, March 25, 2010 2:46 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, May 09, 2013 9:07 AM
Points: 3,
Visits: 67
How to write a DATEDIFF function inside a Derived column of an SSIS Package. Im trying to have theses functions as an expression in a derived column."DATEDIFF(MONTH,con.commencement_date,@EndDate) AS 'Months In Force'" - "commencement_date BETWEEN DATEADD(MONTH,-6,GETDATE()) AND GETDATE()"
Post #889608
Todd McDermid
Todd McDermid
Posted Thursday, March 25, 2010 10:14 AM
SSC Rookie
Group: General Forum Members
Last Login: Thursday, July 22, 2010 9:44 AM
Points: 36,
Visits: 109
When you post a question, especially one where you can't get something to work the way you expect, please post complete information. In this case, post the expression you used, the results you obtained (the error text) and the desired result. Without that, we can only guess.
Here's my guess: You haven't read
BOL on the SSIS DATEDIFF function
to know that it takes a quoted literal instead of a token as the time interval, unlike T-SQL. Most of the SSIS functions that look like T-SQL functions don't operate the same, you'll have to read up on how they're different. Use "month" instead of month.
Todd McDermid
- SQL Server MVP, MCSD.Net, MCTS (SQL08BI)
Find great SSIS extensions - most are open source - at
SSIS Community Tasks and Components
Are you doing Data Warehouse ETL with SSIS? Don't use the slow SCD Wizard, use the
Kimball Method SCD component
instead.
Post #889975
veerendramsbi
veerendramsbi
Posted Friday, January 07, 2011 3:05 AM
Forum Newbie
Group: General Forum Members
Last Login: Friday, January 07, 2011 4:33 AM
Points: 1,
Visits: 1
i want to real time scenarios
Post #1044255
Koen Verbeeck
Koen Verbeeck
Posted Friday, January 07, 2011 5:50 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 6:30 AM
Points: 9,410,
Visits: 6,495
veerendramsbi (1/7/2011)
i want to real time scenarios
Don't we all?
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1044330
xequence
xequence
Posted Thursday, May 26, 2011 8:01 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, December 27, 2012 7:43 AM
Points: 2,
Visits: 10
So, there is no solution to this post? Why does it exist in google when i try to find an answer then? Nobody wants to read how to post a correct question. Just makes you sound like a real douche.
Post #1115490
Sean Lange
Sean Lange
Posted Thursday, May 26, 2011 8:06 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 3:12 PM
Points: 8,957,
Visits: 8,523
I personally hacked into google's server to add this post to their search engine just to irritate you. If you actually read the post you would realize that the answer in looking at the
BOL entry for SSIS datediff function
. Maybe you should try the same instead jumping onto a forum and shouting insults.
_______________________________________________________________
Need help? Help us help you.
Read the article at
http://www.sqlservercentral.com/articles/Best+Practices/61537/
for best practices on asking questions.
Need to split a string? Try Jeff Moden's
splitter
.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Post #1115495
xequence
xequence
Posted Thursday, May 26, 2011 8:28 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, December 27, 2012 7:43 AM
Points: 2,
Visits: 10
DATEADD("month",4,(DT_DATE)[column])
Post #1115524
Kum@R marlapati
Kum@R marlapati
Posted Thursday, December 27, 2012 12:13 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, June 06, 2013 2:22 AM
Points: 2,
Visits: 43
You can add that column names as a new columns in your derived column transformation and in expressions you have to use date functions which are available in the transforamtion.
Thanks
kumar
Post #1400484
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.