Click here to Skip to main content
       

Database

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: Database design questionmemberjschell28 Dec '12 - 10:16 
GeneralRe: Database design questionmemberPIEBALDconsult28 Dec '12 - 14:42 
GeneralRe: Database design questionmemberjschell30 Dec '12 - 8:28 
AnswerRe: Database design questionmemberMycroft Holmes28 Dec '12 - 11:05 
QuestionImporting of Huge fixed width text file in sql server tablememberibrahim sharief27 Dec '12 - 9:24 
AnswerRe: Importing of Huge fixed width text file in sql server tablememberPIEBALDconsult27 Dec '12 - 14:08 
AnswerRe: Importing of Huge fixed width text file in sql server tablememberDeepak Kr130 Dec '12 - 20:29 
AnswerRe: Importing of Huge fixed width text file in sql server tablememberjschell31 Dec '12 - 9:14 
Questionshow Sum(Balance) as ob on Rows Header and add next rows balance in obmemberhadeed147227 Dec '12 - 6:52 
AnswerRe: show Sum(Balance) as ob on Rows Header and add next rows balance in obmemberdjj5527 Dec '12 - 7:53 
GeneralRe: show Sum(Balance) as ob on Rows Header and add next rows balance in obmemberhadeed147227 Dec '12 - 8:03 
QuestionSQL BulkCopy using IDataReader - how can you cast the fields?memberAllan Watkins26 Dec '12 - 19:12 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields?memberMycroft Holmes26 Dec '12 - 20:32 
Well I would say you are screwed, only because you are trying to transform the data in your load. IMHO transforms are the biggest time waster ever inflicted on the load process. I would split the operations to a load process and then a transform. Caveat I am not addressing the size issue as I have never had the problem (and 500mb is very small beer in our environment).
 
I would do the following.
Read in the data file and get the header record.
Create a staging table in sql server exactly matching the column headers - every column to be varchar or nvarchar if needed
Convert the csv file to a datatable (This article [^]may help).
Use BulkCopy to load the data (everything is varchar so it WILL load)
Use a stored proc to do the transforms from the staging table to the target table. If you have to use a dictionary file then you are going to have to take that into account and it will be a challenge (probably a crap load of dynamic sql).
Drop the staging table
Never underestimate the power of human stupidity
RAH

GeneralRe: SQL BulkCopy using IDataReader - how can you cast the fields?memberAllanW1111127 Dec '12 - 6:02 
AnswerRe: SQL BulkCopy using IDataReader - how can you cast the fields?memberPIEBALDconsult27 Dec '12 - 8:48 
QuestionSubquery returns more than 1 rowmemberJassim Rahma24 Dec '12 - 1:02 
AnswerRe: Subquery returns more than 1 rowmemberEddy Vluggen24 Dec '12 - 1:29 
AnswerRe: Subquery returns more than 1 rowmemberMaulikDusara24 Dec '12 - 21:44 
GeneralRe: Subquery returns more than 1 rowmemberEddy Vluggen25 Dec '12 - 2:41 
GeneralRe: Subquery returns more than 1 rowmemberMycroft Holmes26 Dec '12 - 11:17 
GeneralRe: Subquery returns more than 1 rowmemberMaulikDusara26 Dec '12 - 18:45 
GeneralRe: Subquery returns more than 1 rowmemberEddy Vluggen27 Dec '12 - 4:24 
QuestionOn the Naming of Columns for Lookup tables.memberBrady Kelly17 Dec '12 - 22:44 
AnswerRe: On the Naming of Columns for Lookup tables.memberMycroft Holmes17 Dec '12 - 23:19 
GeneralRe: On the Naming of Columns for Lookup tables.memberBrady Kelly17 Dec '12 - 23:26 
GeneralRe: On the Naming of Columns for Lookup tables.memberMycroft Holmes18 Dec '12 - 1:11 
GeneralRe: On the Naming of Columns for Lookup tables.memberBrady Kelly18 Dec '12 - 1:15 
AnswerRe: On the Naming of Columns for Lookup tables.memberPIEBALDconsult18 Dec '12 - 4:05 
GeneralRe: On the Naming of Columns for Lookup tables.memberBrady Kelly18 Dec '12 - 4:12 
GeneralRe: On the Naming of Columns for Lookup tables.memberPIEBALDconsult18 Dec '12 - 4:46 
GeneralRe: On the Naming of Columns for Lookup tables.memberBrady Kelly18 Dec '12 - 5:34 
QuestionOn Strategies to Spell Check the Structure of a Database.memberBrady Kelly14 Dec '12 - 3:02 
JokeRe: On Strategies to Spell Check the Structure of a Database.memberChris Meech14 Dec '12 - 4:31 
AnswerRe: On Strategies to Spell Check the Structure of a Database.memberSimon_Whale14 Dec '12 - 4:52 
AnswerRe: On Strategies to Spell Check the Structure of a Database.memberMycroft Holmes14 Dec '12 - 13:12 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberBrady Kelly14 Dec '12 - 16:36 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberMycroft Holmes14 Dec '12 - 16:57 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberBrady Kelly14 Dec '12 - 17:12 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberMycroft Holmes14 Dec '12 - 21:13 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberBrady Kelly14 Dec '12 - 21:25 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberPIEBALDconsult15 Dec '12 - 8:49 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberBrady Kelly15 Dec '12 - 18:12 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberPIEBALDconsult18 Dec '12 - 10:47 
GeneralRe: On Strategies to Spell Check the Structure of a Database.memberBrady Kelly18 Dec '12 - 11:01 
Questionsending images from a SQL database to a user's email as attachmentmemberMember 946798213 Dec '12 - 2:16 
QuestionRe: sending images from a SQL database to a user's email as attachmentmemberEddy Vluggen13 Dec '12 - 2:29 
QuestionODBC Returns Wrong DatamemberGenJerDan12 Dec '12 - 5:23 
AnswerRe: ODBC Returns Wrong DatamemberChris Meech12 Dec '12 - 5:50 
GeneralRe: ODBC Returns Wrong DatamemberGenJerDan12 Dec '12 - 6:20 
GeneralRe: ODBC Returns Wrong DatamemberChris Meech12 Dec '12 - 6:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 20 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid