April 20, 2011 at 3:59 pm
I am not able to import data froma flat file to a OLE dest table on to SQL server.
File type:
File is a querry result set.
I saved the results of a query to FILE and saved it as Text file.
I tried it as a Ragged Right and {CR} as a row delimitter but no luck. It gives me a ugly picture (attached)
I woudl appreciate if someone can help me figure this out.
Importing a filge generated by a SQL server tool via naother SQL Server tool should be pretty easy i guess. I donno what i am doing wrong. Also attached is Partial rows of my input text file. You can give it a try an dif you are succesful importing pleasee let me know how to do that.
Thanks a ton in davance.
[font="Verdana"]
Today is the tomorrow you worried about yesterday:-)[/font]
April 20, 2011 at 4:04 pm
Yeah, that's a fixed width file. Did you setup column widths in the advanced piece?
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
April 20, 2011 at 5:18 pm
I cannot get into advanced tab, coz everything is combined into a single 'column0'.
I tired specifying column width as 8 on column0 just for testing , but nothing changed.
Thanks
[font="Verdana"]
Today is the tomorrow you worried about yesterday:-)[/font]
April 20, 2011 at 10:54 pm
Problem is with Import File;
Try manual import in SQL Sever, you will identify the problem.
File is fixed width however column value contains space in postcode
April 21, 2011 at 6:39 am
Figure out the widths of each column, import them all as strings, trim them and convert them to the actual datatypes.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
April 26, 2011 at 2:16 pm
You can use the Advanced option to add column names and data type of the columns in your flat file and make sure you can see the data load in preview.
Kind regards,
Gift Peddie
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply