Wrox Programmer Forums
|
SQL Server DTS Discussion specific to Data Transformation Service with SQL Server. General SQL Server discussions should use the general SQL Server forum. Readers of the book Professional SQL Server 2000 DTS with questions specific to that book should post in that book forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server DTS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 27th, 2005, 04:44 AM
Registered User
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Skip a row

Hi guys,

thanks for your earlier help.

I now have a text file which has footer in the end with a date. I need to skip this line while executing my package as it otherwise results in error.

I can't seem to figure out how to do this. The import wizard just asks the no. of rows to be skipped(from the top) so it is of no use. I want to specify it to ignore the last row or better still any random row.

Thanks a lot

 
Old September 27th, 2005, 09:36 AM
Authorized User
 
Join Date: Sep 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can do 2 things
1
If the first couple of characters are always the same you could check it in your transformations like this
If DTSSource("Col001") ="footer" then
'do nothing
else
DTSDestination("Field1") = DTSSource("Col001")
end if

2
use the file system object and save the file without the footer

an excellentt DTS book is Professional SQL Server 2000 DTS (Data Transformation Services)
http://www.amazon.com/exec/obidos/AS...ink%5Fcode=xm2

http://sqlservercode.blogspot.com/
 
Old September 27th, 2005, 11:06 PM
Registered User
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you sqlmenace. Your solution gives me the desired result when I try in on a test package. I want to use this in my actual package which I had already created using the wizard (but at that time I had not selected ACTIVEX). Is there a way to add this script to my already created package? It is a pain to create the package all over again since I had created a number of column widths and names which would need to be redone. Thanks?

Oh, I just went and bought the book you recommended. I am in chap 2 now :)) Tks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
skip first field gilgalbiblewheel Classic ASP Databases 1 July 7th, 2007 05:10 PM
how to skip from one page to other rashmipant PHP How-To 2 December 8th, 2006 05:20 AM
Why would this skip record #1? dep XSLT 8 November 1st, 2006 02:57 PM
Skip On Refresh Prabhakar_dt Classic ASP Basics 9 September 2nd, 2004 11:44 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.