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

Automatically Mapping Flat File Sources Data types to Destination Expand / Collapse
Author
Message
Posted Wednesday, July 31, 2013 10:34 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 18, 2013 11:17 AM
Points: 29, Visits: 78
Is there anyway to automatically map a flat file sources data types to the ole DB destinations data types? I'd rather not have to go through a data conversion for every source/destination match

-choosing the 'suggest data types' in the flat file sources options isn't changing them correctly.

Thanks
Post #1479592
Posted Thursday, August 01, 2013 12:25 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 18, 2013 11:17 AM
Points: 29, Visits: 78
The easiest way to do this is to go into SQL Management Studio and NOT BIDS.



^ Unsure why this doesn't work, maybe I need to be on forum for longer

https://www.dropbox.com/s/e72t24uwsuubt5t/1.jpg

I was going to give a screen by screen tutorial.


-Right click on your database
-Hover your mouse over tasks
-Go to Import Data
-Use this wizard to import data (I used a flat file source) into database tables
-Part of the wizard has a convert section which will take care of mostly everything
-Before getting to the finish window, you will be prompted as to whether or not you want to save the package and run immediately.
-I suggest not running the package immediately, saving it, opening it up in BIDS

You may have to change some data types (it seems non-Unicode string [varchar] doesn't like choosing it's size automatically) in bids.

I have run into problems where it required me to edit the package in bids and create an Execute SQL task== utilize the "truncate table" query, other times I did not.

I hope this helps.
Post #1480081
Posted Friday, August 02, 2013 12:40 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Yesterday @ 4:25 AM
Points: 4,828, Visits: 11,184
Ryan1 (7/31/2013)
Is there anyway to automatically map a flat file sources data types to the ole DB destinations data types? I'd rather not have to go through a data conversion for every source/destination match

-choosing the 'suggest data types' in the flat file sources options isn't changing them correctly.

Thanks


No one mentioned the Import Wizard as a possible solution because of the way you phrased this question. If you had said something like this:

Is there any way to automatically map a flat file source's columns to the OLEDB destination table's columns?

Someone would have suggested the Import Wizard fairly promptly. 'Data types' refers to the definitions of the columns involved (string, int, date etc.) and so your request completely puzzled me!



Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.
Post #1480258
Posted Friday, August 02, 2013 5:48 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Friday, October 18, 2013 11:17 AM
Points: 29, Visits: 78
Ah okay, thanks
Post #1480341
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse