Jump to content

SQL Experts Please help


Recommended Posts

Posted

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.. 

Posted
36 minutes ago, andhrabullet said:

Use sql bulk copy

C# compulsory requirement la

Posted

sorry 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...

Posted
19 minutes ago, loveindia said:

sorry 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 

Posted
3 minutes ago, 4Vikram said:

one mukka ardam aite hit with cheppuls uncle man 

Hold tight for another 30 minutes man then

Posted
39 minutes ago, loveindia said:

sorryman 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...

brahmi%20laugh_01.gif?1403646236

Posted
11 minutes ago, loveindia said:

Hold tight for another 30 minutes man then

poduna message chesinapati nunchi tight gane patkoni kusuna hain brahmi%20laugh_01.gif?1403646236

Posted

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 

Posted

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..

Posted
1 hour ago, 4Vikram said:

poduna message chesinapati nunchi tight gane patkoni kusuna hain brahmi%20laugh_01.gif?1403646236

are you working in support ??

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...