4Vikram Posted June 26, 2016 Report Share Posted June 26, 2016 Naak requirement... CSV File nunchi server ki data import kavali through bulk load and this should be in a package.. here are twists: CSV file lo columns and rows chaala unai and ee columns change aituntai so the it should be a dynamic script.. Table name i am from file name, so everytime data update ainapudu table drop avali and same table name tho kotha table create ai data load kavali Metadata vala C# code use chestuna, na degara oka code undi adi bane working but point endi anta ade bulk load avatledu, line by line aitundi.. so idhi requirement,, please any one help urgent important mandatory situation.. thanks in advance.. Quote Link to comment Share on other sites More sharing options...
andhrabullet Posted June 26, 2016 Report Share Posted June 26, 2016 Use sql bulk copy Quote Link to comment Share on other sites More sharing options...
4Vikram Posted June 26, 2016 Author Report Share Posted June 26, 2016 36 minutes ago, andhrabullet said: Use sql bulk copy C# compulsory requirement la Quote Link to comment Share on other sites More sharing options...
loveindia Posted June 26, 2016 Report Share Posted June 26, 2016 man poker tournament aadutundey when you called.. now driving back home... texting from phone. Basically solution goes like this.. First take the file name and drop the table. Use streamreader in c# and read only columns and dynamically create new table with file name. Use dynamic configurations for both flat file and table name and load sql table using regular data flow task. Come back and thank me.. good luck man... Quote Link to comment Share on other sites More sharing options...
Butterthief Posted June 26, 2016 Report Share Posted June 26, 2016 ok Quote Link to comment Share on other sites More sharing options...
loveindia Posted June 26, 2016 Report Share Posted June 26, 2016 Add delay validation if you are not sure about Metadata man.. Quote Link to comment Share on other sites More sharing options...
4Vikram Posted June 26, 2016 Author Report Share Posted June 26, 2016 19 minutes ago, loveindia said: man poker tournament aadutundey when you called.. now driving back home... texting from phone. Basically solution goes like this.. First take the file name and drop the table. Use streamreader in c# and read only columns and dynamically create new table with file name. Use dynamic configurations for both flat file and table name and load sql table using regular data flow task. Come back and thank me.. good luck man... one mukka ardam aite hit with cheppuls uncle man Quote Link to comment Share on other sites More sharing options...
loveindia Posted June 26, 2016 Report Share Posted June 26, 2016 3 minutes ago, 4Vikram said: one mukka ardam aite hit with cheppuls uncle man Hold tight for another 30 minutes man then Quote Link to comment Share on other sites More sharing options...
rikki Posted June 26, 2016 Report Share Posted June 26, 2016 39 minutes ago, loveindia said: man poker tournament aadutundey when you called.. now driving back home... texting from phone. Basically solution goes like this.. First take the file name and drop the table. Use streamreader in c# and read only columns and dynamically create new table with file name. Use dynamic configurations for both flat file and table name and load sql table using regular data flow task. Come back and thank me.. good luck man... Quote Link to comment Share on other sites More sharing options...
4Vikram Posted June 26, 2016 Author Report Share Posted June 26, 2016 11 minutes ago, loveindia said: Hold tight for another 30 minutes man then poduna message chesinapati nunchi tight gane patkoni kusuna hain Quote Link to comment Share on other sites More sharing options...
rikki Posted June 26, 2016 Report Share Posted June 26, 2016 1. Read the table name from csv file. Drop the table in db. 2. Read the first line from file and now you have tablename and all column names. Send query to create table. 3. Use SqlBulkCopy to throw the data on to the table. Note: dont use async(incase the data is ready to be thrown before actual table got created), if the data size is huge do the bulk copy in batches Quote Link to comment Share on other sites More sharing options...
loveindia Posted June 26, 2016 Report Share Posted June 26, 2016 Sent the package to your email man. Change the file location and run man.. it has drop statement also inside it... just file name change.. Quote Link to comment Share on other sites More sharing options...
KharjuraNaidu Posted June 27, 2016 Report Share Posted June 27, 2016 1 hour ago, 4Vikram said: poduna message chesinapati nunchi tight gane patkoni kusuna hain are you working in support ?? Quote Link to comment Share on other sites More sharing options...
4Vikram Posted June 27, 2016 Author Report Share Posted June 27, 2016 final ga sql god daya valla done man pyakageee... Jai SQL, Jai Jai @loveindia vuncle.... Quote Link to comment Share on other sites More sharing options...
Kirak007 Posted June 27, 2016 Report Share Posted June 27, 2016 nee fellanni dengataniki kuda loveindia gadinee pampinchu raa Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.