Author |
Topic |
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-13 : 18:39:49
|
Hello All,1 process) extract data from text file and store in database table, after this, sql procedure will execute (through Execute Sql Task) it will store some data in a table.2process:-required)now it needs to be extend to the above one how can i create a CSV file, with the data of temporary tableCan you please give me an ideaBest Regardsasini |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-13 : 18:47:32
|
Do you mean again you want to export it back to CSV? |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-13 : 19:15:42
|
quote: Originally posted by sodeep Do you mean again you want to export it back to CSV?
SoDeep,yes, as soon as Execute Sql task finishes work(it will loads some data to some table) then i want to export table data to csv and save in some folderThanks & Regardsasini |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-13 : 19:26:36
|
Use Flat File Destination and assign the folder |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-13 : 19:38:06
|
quote: Originally posted by sodeep Use Flat File Destination and assign the folder
i tried it in Data flow tab (Flat File Destination), but unfortunately i cant setup the source. how can i set the source, my current package process is 1) loops the folder to find some .ctd extension files in it2) then derived column task is to create additional column to flat file column (step 1 columns)3) load in to temp table4) sql procedure task (check & delete some records in tableA, and updates records in tableA then insert to another tableb)so here i want to write table A values to csv file========== some more explanationwe can do in a new package, as source is Sql server table and destination is file system(CSV).instead of creating separat package, is there any way to extend the current onecan we create multiple tasks in single package (such as 1st task is upto execute sql task) if yes then can we set order or execution for tasks (2nd is execute export to csv task)please correct me if i am wrongand give me any suggestions regarding to thisThanks & Regardsasini |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-13 : 19:53:29
|
Use this:http://ankeet1.blogspot.com/2008/04/using-foreach-loop-container-in-ssis.html |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-14 : 09:28:31
|
quote: Originally posted by sodeep Use this:http://ankeet1.blogspot.com/2008/04/using-foreach-loop-container-in-ssis.html
Hi Sodeep,thnakyou for your reply sodeep,it seems to be not the solution for this problemin my project, till now (procedue will execute through Execute Sql task) --> actually this procedure is loads some data into tableAso now user requirement is, after execute sql procedure, it needs to generate one csv file from the tableA(having data by previous task).Thanks & Regardsasini |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-14 : 12:03:53
|
Sodeep,finally i got it,by adding dataflowtask in control flow then in this data flow task i put source as oledb source and destination as flatfiledestinationthen finally it workthank you very much for your replies Best Regardsasini |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-14 : 18:49:20
|
Hello All,here when i am using Source as OLEDB (sql table) and destination is Flatfiledestination (CSV file), in csv files no column headings (it loads only data of the table) can any one please tell me that, how can i get the column names in the first row of the csv fileThanks & Regardsasini |
 |
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2008-10-14 : 18:57:25
|
Choose Column name in First data row in Flat file Dest. |
 |
|
dhani
Posting Yak Master
132 Posts |
Posted - 2008-10-14 : 19:27:58
|
quote: Originally posted by sodeep Choose Column name in First data row in Flat file Dest.
Sodeep,thank you for your reply, i tried before i post this question, but it didn't work out, however i tried it once again after your replynow it is working fine.but in continue with this i found another problemi.e when i write data to csv file it needs to be each value surround with double quote value.hense i selected the option Text Qualifier as " so it is also working fine, but the problem is double quotes is applying to column headers to how can i eliminate the double quotes only for column headers and remain with valuesthanks in advanceasini |
 |
|
|