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

mixed data columns Expand / Collapse
Author
Message
Posted Monday, April 22, 2013 2:35 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 1:48 AM
Points: 50, Visits: 183
I currently have a column that have both numeric and characters:
Example: 3
PF
11
PF
PF
3
3
I am trying to pull the data like this into ssis and send it to a sql table.
What I get are NULLS when I do DT_NUMERIC and DT_STR will not pull it in either. Did anyone had this problem and came up with an answer?

Kind regards
Fred
Post #1444897
Posted Tuesday, April 23, 2013 9:34 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 8, 2013 7:16 PM
Points: 221, Visits: 132
What are the settings for the column in the table you are trying to pull this data into?

--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/
You can also follow my twitter account to get daily updates: @BLantz2455
Post #1445756
Posted Wednesday, April 24, 2013 12:58 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Today @ 1:48 AM
Points: 50, Visits: 183
Hi there

My column is currently set up as varchar but will change it to the required field if need be.

Kind regards
Fred
Post #1445788
Posted Wednesday, April 24, 2013 9:43 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 8, 2013 7:16 PM
Points: 221, Visits: 132
frdrckmitchell7 (4/24/2013)
Hi there

My column is currently set up as varchar but will change it to the required field if need be.

Kind regards
Fred


Have you changed the data type in the table and if so, from what?


--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/
You can also follow my twitter account to get daily updates: @BLantz2455
Post #1446073
Posted Wednesday, April 24, 2013 10:50 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 11:16 PM
Points: 839, Visits: 5,422
Why not split the two types out inside SSIS:

select someData, ISNUMERIC(someData) As NumTest
from test
WHERE ISNUMERIC(someData)=1;

The example is kind of overdone, but the idea is that you can test/filter for whether the column contains numeric data, and route that data inside your dataflow... and just send the non-numeric data into a different one.
Post #1446289
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse