Bases de Datos - Exportar datos

 
Vista:

Exportar datos

Publicado por Javier (1 intervención) el 22/09/2009 06:03:54
Hola, tengo el siguiente problema:

Tengo informacion en una base de datos en SYBASE, quiero exportar la información de una tabla a un archivo .txt desde un stored procedure....

Como le hago, hay alguien que me pueda ayudar???
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Exportar datos

Publicado por Leopoldo Taylhardat (187 intervenciones) el 24/09/2009 13:05:05
To export data from a database table into an external ASCII-format file.

Syntax

UNLOAD [ FROM ] TABLE [ owner. ]table-name
... TO 'filename -string '
... [ FORMAT ASCII ]
... [ DELIMITED BY string ]
... [ QUOTES ON | OFF ] [ ESCAPES ON | OFF ]
... [ ORDER ON | OFF ]
... [ ESCAPE CHARACTER character ]

Description

The UNLOAD TABLE statement allows efficient mass exporting from a database table into an ASCII file. UNLOAD TABLE is more efficient than the Interactive SQL statement OUTPUT, and can be called from any client application.
UNLOAD TABLE places an exclusive lock on the whole table.
When unloading columns with binary data types, UNLOAD TABLE writes hexadecimal strings, of the form \xnnnn where n is a hexadecimal digit.
For descriptions of the FORMAT, DELIMITED BY, and ESCAPE CHARACTER options, see LOAD TABLE statement . The other options are as follows:

QUOTES option With QUOTES turned on (the default), single quotes are placed around all exported strings.
ESCAPES option With ESCAPES on (the default), backslash-character combinations are used to identify special characters where necessary on export.
ORDER option With ORDER on (the default), the data is exported ordered by primary key values. With ORDER off, the data is exported in the same order you see when selecting from the table without an ORDER BY clause.

Exporting is slower with ORDER on. However, reloading using the LOAD TABLE statement is quicker because of the simplicity of the indexing step.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Exportar datos

Publicado por Rodargo (23 intervenciones) el 12/05/2011 07:11:18
Mira que hace poco tenia un problema parecido pero era con archivos de excel y bases de datos mysql y buscando encontre un buen programa que me ayudo a resolverlo y seguramente te puede ayudar a ti también.
te lo recomiendo.
[noparse][URL="http://sites.google.com/site/thingssoftware/productos/dbx-export10exportacionentrefuentesdedatos"]DBX-Export 1.4 (Exportación entre fuentes de datos)[/URL][/noparse]:cool:

Dice que después de que tengas los drivers ODBC para conectarte, puedes conectarte a cualquier fuente de datos y pasar datos de un lugar a otro. como por ejemplo de una tabla de musql a un archivo excel o viseversa. mejor dicho desde cualquier fuente de datos hasta cualquier fuente de datos pruebala.
te lo dejo y ojala te sirva,
suerte!!!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar