home
training courses
why choose us?
solutions
support
company
LearnItFirst User Forum
Welcome Guest
Search
|
New Posts
|
Members
|
Log In
|
Register
SQL Server Forum - LearnItFirst.com
»
SQL Server Database Administration
»
Integration Services (SSIS) and DTS
»
Export from SQL to FlatFile with User providing a Date Variable for selection
Export from SQL to FlatFile with User providing a Date Variable for selection
Options
Previous Topic
·
Next Topic
reinholdw
Posted:
Friday, October 24, 2008 6:29:01 AM
Rank: Newbie
Joined: 10/24/2008
Posts: 1
Points: 3
Where do you live?: Tallahassee, Florida
I would like to know if there is a video or sample that addresses going from SQL2005 to a Flat File that uses a script that evalutates multiple fields in sql and then sets a value in the flat file. Here is a portion of the current transact sql from dts that I am trying to convert to ssis, thank you for any assistance you can provide.
Function Main()
DTSDestination( Filecd ) = "T"
DTSDestination( Permit ) = DTSSource( Permit )
DTSDestination(Blank1 ) =
If len(DTSSource( DateInsp )) > 0 Then
DTSDestination( DateInsp ) = fixDate(CStr(DTSSource( DateInsp )), yyyymmdd )
End If
If DTSSource( Routine ) = TRUE Then DTSDestination( Purpose ) = RO
ElseIf DTSSource( Construction ) = TRUE Then
DTSDestination( Purpose ) = CN
ElseIf DTSSource( Complaint ) = TRUE Then
DTSDestination( Purpose ) = CO
End If
DTSDestination( DateInsp ) = DTSSource( DateInsp )
b]******* I would like the user to have provided a date input
prior to this starting that would evaluate and ONLY select those records >= the user date.[/b][/color]
Back to top
Users browsing this topic
Guest
Forum Jump
SQL Server Database Administration
- General SQL Database Question & Answer
- Backup, Recovery and Disaster Recovery
- SQL Server Security
- Integration Services (SSIS) and DTS
Transact-SQL Programming
- DML (SELECT, INSERT, UPDATE, DELETE) Questions
- Stored Procedures, Triggers, & Functions
SQL Server Scripts, Code Samples and SSMS Custom Reports
- All SQL Server Versions
- SQL Server 2005/2008
- SQL Server Management Studio Custom Reports
Customer Service
- Video Requests
You
cannot
post new topics in this forum.
You
cannot
reply to topics in this forum.
You
cannot
delete your posts in this forum.
You
cannot
edit your posts in this forum.
You
cannot
create polls in this forum.
You
cannot
vote in polls in this forum.
SQL Server 2005 DBA Training Videos
SQL Server 2008 DBA Training Videos
Email this topic
RSS Feed
Watch this topic
Print this topic
Normal
Threaded