Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Importing Validation Expand / Collapse
Author
Message
Posted Tuesday, January 20, 2009 7:21 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77, Visits: 399
Hi, Y'all

Q. I created an import Job using DTS, and it works fine, the only issue is when the spreadsheet is empty or excel file is not present, the job abends; that is fine. what I need is a method with in DTS to validate the existance ofthe File itself and then validate the existance of the worksheet.

Any ideas are more then welcome, but please test your response, I am sure that more the just me is reading this thread.

thanks

;)




"We never plan to Fail, We just fail to plan":)
Post #639941
Posted Wednesday, January 21, 2009 8:18 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77, Visits: 399
Guys
All Issues where resolved. here the answer was to use a non documented store procedure called xp_FileExist and catch the reurtn code.

exec xp_fileexit 'c:\tst.txt', @catchcode Output

if the @catchcode = 1
Print ''file has arrived.'
else
Print 'No file is here yet.'

you know the general idea.

thanks




"We never plan to Fail, We just fail to plan":)
Post #640775
Posted Wednesday, January 21, 2009 9:01 AM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Tuesday, September 18, 2012 3:00 PM
Points: 770, Visits: 1,593
just out of curiosity, which version has got this XP, i cant see this on SQL 2005 :D
Post #640846
Posted Wednesday, January 21, 2009 9:30 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77, Visits: 399
Found it on SQL 2000




"We never plan to Fail, We just fail to plan":)
Post #640880
Posted Wednesday, January 21, 2009 10:11 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:00 PM
Points: 5,102, Visits: 20,205
xp_FileExist and catch the reurtn code.

exec xp_fileexit 'c:\tst.txt', @catchcode Output


Watch the spelling in the exec line it is misspelled. It does exist in my SQL 2005.


If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
Post #640929
Posted Wednesday, January 21, 2009 10:16 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Today @ 2:00 PM
Points: 77, Visits: 399
Thanks for the Correction, Please understand I was very busy at the time. thx



"We never plan to Fail, We just fail to plan":)
Post #640933
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse