Export Iibre office database table to text file or csv file - database

I have a Libre Office database table that I want to export or save as a .csv file. Is there any way to do this? I have been searching for a long time. I can write a very little bit in Java but would need some code suggestion in that case. Thank you!

Just right click the database you want to export and select copy, create a new Calc spreadsheet, paste the data into the spreadsheet, and then export it from the "file" menu however you like.
Source.

Related

I want to fill a data base table from an xslt file

I have a Table (Exchange) in my Data Base (SQL) Exchange(ExchangeDateStart,ExchangeDateEnd,Value,Code), the Period is monthly. And my csv file :
Now, my problem is how can i use this file to fill my table, i think about Stored Procedure or bash script but i used MySQlserver in the end to import the data, but i can't do the mapping between source and destination because i have just one DateStart and one DateEnd , in csv file i have multiple Date the same for the columns A.
To be more clear i want To show them like this
:
If someone could help me plz,
I suggest to use Python and one of its packages that can import Excel data.
If you google "import excel data into database with python" then you'll find code that shows you how to do it. Here's one howto with code: https://mherman.org/blog/import-data-from-excel-into-mysql-using-python/
In the End i use'import data' from MySqlServerManagament in a tempory table after i update this table with a P.S [https://support.discountasp.net/kb/a1179/how-to-import-a-csv-file-into-a-database-using-sql-server-management-studio.aspx]

Export file is not what it should be?

I have 12 tables and I export the tables using SSIS into a existing excel file.
But the results in the excel file is not the same as the sql tables.
I'm not sure but I think the problem is when I export cause it show me this:
the table values are:
and after exporting the excel file is showing me this:
this is now the excel result, they are all correct except the first one. The service Type should be 'PS' like the rest of them but its not?
Excel sometimes keeps a strange formatting and skip lines,
in these cases it may be necessary to prepare an empty CLEAR new template file ( xls ) by deleting the lines in a "brutal way" (select all the rows from the header at the end of the file, right-click and then delete) and run the export again.

Changed records since last export

Im trying to figure out the best way to do delta exports using SSIS. I have a set of tables in a database that should be exported to a set of files at daily interval. I will have to export ONLY new and altered records. In each table there is a field called LastEdit that holds the date when the record was last edited (or created).
So my initial thought was to have a new table with something like "id","Jobname", "LastRun". Now whenever i export a table using a SSIS job, i will write the date of the run in this table along with the job name. And then next time i have to export data i will look in this table and find last run date and only export records newer than this.
Im fairly new to SSIS so im thinking if this is the best way or if there are some build in functionality for doing this, or if someone have a better design pattern for this.
Thanks in advance
SSIS + Change Data Capture is designed exactly for this.

How to export a finished BigQuery Job as a CSV

I know you can run a job and export a csv for an table like under the python example
https://developers.google.com/bigquery/exporting-data-from-bigquery
But Is there a way to export a finished query job as a csv if I have the job ID? Ultimately I want the query to display in a table on the browser (already have this working) and also have a button where they can download the file as well.
Cheers
If you look up the query job, it will have a destination table specified. If you didn't provide your own table name, this will be a new temporary table created by BigQuery.
You then have two options for getting the results as csv. You can run an export job to export that table as CSV. Or, you can run a tabledata.list() operation on that table and set "alt=csv" which will return the beginning of the table as CSV. Please let me know if you need more detailed instructions.

seeing all the records of query and later importing them into a csv file

I am using Oracle Sql Developer as a interface in which I am firing a query returning 85,000 rows of which only 58,000 approx rows are shown.
Can you guys please advise any way by which I can:
see all the records
export them (later) into a csv file
Please advise.
In SQL Developer. Once you get the results -> right click on records select export -->Export wizard pops up then select format ( exp CSV), choose desitination where you want file to be stored then click next and finish.

Resources