SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 5gb file, 77M rows and column types don't match =(
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

SlinginParts
Starting Member

18 Posts

Posted - 06/25/2012 :  22:20:33  Show Profile  Reply with Quote
So I'm working with this huge bunch of files which we have provided from a data licensing company. The descriptions for instance are varchar200 for a column. However, running a suggestion scan shows some in excess of this. Which is a problem.

I would just have it scan the whole file and figure it out, but I don't want to be so obtuse to just max that value out.

So now I'm left with importing 128 files for 5 types by hand. Is there any other more sane way to manage this?

SlinginParts
Starting Member

18 Posts

Posted - 06/25/2012 :  22:22:14  Show Profile  Reply with Quote
I want to clarify when I say "the descriptions" are provided to us by the data vendor in their documentation. So using a string200 failed, then string270 got me an extra couple million rows. Past that I can't scan the file in its entirety to find out where the widest part is in the column. I can't even open the file in any sane editor.
Go to Top of Page

SlinginParts
Starting Member

18 Posts

Posted - 06/25/2012 :  23:59:48  Show Profile  Reply with Quote
OK so I'm cheating kind of. I'm assuming there are some real scragglers in all this data so I've got a string size of 4000. Once its all in I'll run a query to determine the total maximum string size and reduce it after the fact.

So far I'm at 37M rows, crossing my fingers!
Go to Top of Page

SlinginParts
Starting Member

18 Posts

Posted - 06/26/2012 :  01:00:35  Show Profile  Reply with Quote
whoohoo went in!
Go to Top of Page

DonAtWork
Flowing Fount of Yak Knowledge

2111 Posts

Posted - 06/26/2012 :  05:58:42  Show Profile  Reply with Quote
now that it is all in, you can see the max value, and let the vendor know that they gave you bad info.








How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Go to Top of Page

SlinginParts
Starting Member

18 Posts

Posted - 06/26/2012 :  08:20:10  Show Profile  Reply with Quote
Could have been an issue with the download too, or my computer corrupting it. Honestly is it unreasonable for me to request this already done in an SQL Server file? I mean I understand some people want start from ground zero, but this is just way too much work for anyone that isn't a data warehouse master.

I think however it may be an issue on there end too, because on 3 separate tables the same day are corrupt.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000