New answers tagged

0

I came around looking for a solution to export an IMAGE Column having stored different kind of file types (pdf, xls, doc, xml ...) I want to export. The approach in the answer worked for pdf files only. To export all kinds of files I had to adjust the solution as follows: (1.) Create a format template file: Declare @sql varchar(500); Declare @sql varchar(...


1

OK simple solution. Use: conn = psycopg2.connect("db=dbname etc etc") lo = conn.lobject(12345) lo.export('/tmp/test.jpg')


2

From the symptoms, it seems that you are using InnoDB engine for your tables. If so, it is normal not to have accurate number of rows shown by clients (Like HeidiSQL or PHPMyAdmin). It is also worth it to mention that SHOW TABLE STATUS LIKE 'table_name' does not provide accurate row count for InnoDB tables. InnoDB estimates the number of rows in the ...


1

I'd probably take a short solution to this: Create a SQL Agent Job Create a step using sqlcmd to BCP out the query and save it as a .csv file for relevant years Send to developer If he wants each year in a separate worksheet or something, that's something he can make a macro in Excel for - just giving a dump of the actual data should be sufficient enough ...


5

PowerShell is the way to go: # Original Author : Bill Fellows (http://billfellows.blogspot.com/2011/03/powershell-export-query-to-csv.html) # Modified by : Kin Shah (http://dba.stackexchange.com/users/8783/kin) # Added the -NoTypeInformation to remove "#TYPE System.Data.DataRow" from the header ! # http://www.vistax64.com/powershell/...


0

BCP works fine. First, you create the target table. Then export data with the select and filter you need. Import data with BCP will fit the correct partitions. I did this before. I was on SQL 2014, but it will be fine on 2012.


5

Without getting too involved in specific details on the language required to do this in Sybase SQL Anywhere 8, which is now more than 15 years old, I'd recommend something like the following: create a table on the laptop database that contains a column which uniquely identifies rows that have already been exported to the main database. the export function ...


1

The requirement to specify a directory object is only there with the new expdp utility. The older exp tool allows specification of an absolute path. I was able to take a backup using exp without having any special privileges and without creating any directory objects, just using my username and password. Though succeeded by expdp, exp is still included in ...



Top 50 recent answers are included