SSIS - Exporting data with commas to a csv file - ssis

I am trying to export a list of fields to a csv file from a database.
It keeps putting all the data onto one column and doesn't separate it. When checking the preview it seems to be okay but on export its not working. Currently trying to following settings. Any help would be appreciated.
SSIS settings
Excel file output issue

Actually it seems to work, Excel is just too dumb to recognize it.
Mark the whole table, then go to Data -> Text in Rows
And configure the wizard (Separeted, Semikolon as Separator):
Now you have seperated the rows and cells:

Related

Access Export to CSV, trouble keeping leading zeros, 55-60 Million Records

Let me preface this by saying yes, I do need all of the records. It's part of a FOIL request. Not necessarily in one worksheet or file.
I'm having trouble figuring this out. I am currently able to export about 500k records at a time without timing out or exceeding access file size(I think this is due to working with state systems legacy data) or worrying about excel row limit. I can preserve column headers but lose leading zeros in one field.
This is done using the export wizard to text file. I change the destination file name ending from .txt to .csv and that gives me the option to keep headers. On the preview of the .csv file in the wizard and when opened in notepad it shows the field with leading zeros correctly with double quotes around it, for example "00123456" but then when opened in excel it shows as 123456. If I update the row from General format to Text the contents remain the same.
I have tried VBA method of DoCmd.TransferSpreadsheet but when I try to run it I am prompted with a Macros box. And honestly am less familiar with VBA than in am SQL. Overall I consider myself a novice.

How can I export .csv files correctly?

I've got two tables (8/~150 columns). The first one gets filled with personal data, while the second one is a "checklist" which is filled with one character.
I created a query, which concatenates both tables, to export it as a .csv file. When I try to do so (with the export wizard) I get this exception:
The Microsoft Access database engine could not find the object 'filename.csv'. Make sure the object exists and that you spell its name and the path correctly.
I double checked, tried to do it with VBA, but nothing worked.
I don't know what I should try to do.
I'm hoping that someone can help me
Paul

When I import a CSV to MySQL Workbench two extra columns appears

I have a CSV file with 9 columns but when I import it via MySQL Workbench it appears two extra columns with no values. A kind of solution is to deselect them but I want an explanation and a permanent solution to avoid this. Why is this happening? I attach a screenshot to see exactly what I say.
Sometimes in excel file type something and delete, excel file include or read blank columns or row.
If you delete those two columns after gameid in CSV file, after that import CSV file in mysql.

SSIS Re-Order Column Headings in CSV

I have a SSIS Package that Imports data from multiple CSV files into a multiple tables within a SQL database, I then do a SQL query to get the data I need and export into a csv file.
My issue is: I need to re-order the columns and I can't do this within the connection manager.
I can add new fields to the csv within the connection manager and can 'add before' or 'add after' to get the positioning correct but I cannot re-order the existing ones.
Is this possible within SSIS ? I have tried looking around but cannot see how to achieve this
i figured this out. I deleted the columns from the connections manager and re added them where I wanted them positioned. I then went into the flat file destination and re mapped the headings with correct field.

Copy from MySQL Workbench to Excel

I have to build reports, and I need to do some database queries, which return a bunch of results.
Is there a way I can copy 1+ rows/columns and copy them into an excel sheet? the excel sheet is formatted a particular way, and the data needs to be placed in there a certain way, so how can I copy and paste from mysql workbench into excel?
The best answer I could come up with is to use a different program:
http://www.heidisql.com/
So far this program works great! I like it a lot better than MySQL Workbench as well!
Go to workbench and select the rows that you need. Copy them.
On your pc create a new file, paste the data in it. Save it as .csv
Open the newly created csv file in MS Excel. The data will be nicely formatted.
In my requirement I have to copy the column name, data type and its constraint.
I executed command
desc tableName
Where tableName is required table name.
in heidisql to execute query you have to press "F9" key.
It will display the whole structure of table. Now to copy paste in excel you have to right click on result then you can see
"export grid rows"
third last option in right click.
then select radio button File then select file name.
No need of any alteration in encoding part and you can select from output format e.g. excel csv, html table etc.
and then ok.
Go and open your file then complete result will be copied to the excel sheet.
Thanks