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

Extracting from one cell in excel. and from Expand / Collapse
Author
Message
Posted Thursday, May 1, 2014 2:23 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:29 PM
Points: 13, Visits: 52
I have a excel file. in one cell, column A row2, there is a text.
"This is effective as of February 5, 2014"

I need to get the date from this text and load into a table in sql server using ssis. how do I do this?
Post #1566854
Posted Friday, May 2, 2014 10:57 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Yesterday @ 10:41 AM
Points: 52, Visits: 146
I don't even know where to start. Do you know SSIS at all?
Post #1567124
Posted Friday, May 2, 2014 11:35 AM This worked for the OP Answer marked as solution
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:29 PM
Points: 13, Visits: 52
I solved this task. I used script component to write VB code. with VB I could extract the text from the cell in excel and put it in array.

I put the text in array and put last three words together which have date information.
Post #1567135
Posted Tuesday, May 20, 2014 5:23 PM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 4:50 PM
Points: 358, Visits: 876
Will this work if the next time you get "This is effective as of May 5, 2014" ? - just giving a heads up in case you are using a string function like Right (..,..)
Post #1572955
Posted Tuesday, May 20, 2014 5:30 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:29 PM
Points: 13, Visits: 52
I did not use Right (..,..).

I put each words into an array. and got the size of the array. if the size of the array is X, I got the last three words by words[x-2],words[x-1],words[x]

each word occupies a space in array. not each character.
Post #1572957
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse