BCP

30/12/2003 - 15:47 por Mario | Informe spam
Sres, he intnetado devarias formas, pero no han dado
resultado.
¿Como se usa el BCP con una "query"?

bcp [Table|view|"query"]

alguien tiene un ejemplo que funcione?


gracias

Preguntas similare

Leer las respuestas

#1 ulises
30/12/2003 - 16:15 | Informe spam
Prueba con :

bcp "select * from pubs.dbo.authors" queryout
c:\authors.txt -Usa -P -S (local) -n

adecua el usuario, password y servidor.

Saludos,
Ulises

Sres, he intnetado devarias formas, pero no han dado
resultado.
¿Como se usa el BCP con una "query"?

bcp [Table|view|"query"]

alguien tiene un ejemplo que funcione?


gracias
.
Respuesta Responder a este mensaje
#2 Gustavo Larriera [MVP]
30/12/2003 - 16:34 | Informe spam
C:\Program Files\Microsoft SQL Server\80\Tools\Binn>bcp "select * from
pubs..titles" queryout resultado.txt -S localhost -T

Enter the file storage type of field title_id [char]:
Enter prefix-length of field title_id [0]:
Enter length of field title_id [6]:
Enter field terminator [none]:

Enter the file storage type of field title [char]:
Enter prefix-length of field title [0]:
Enter length of field title [80]:
Enter field terminator [none]:

Enter the file storage type of field type [char]:
Enter prefix-length of field type [0]:
Enter length of field type [12]:
Enter field terminator [none]:

Enter the file storage type of field pub_id [char]:
Enter prefix-length of field pub_id [0]:
Enter length of field pub_id [4]:
Enter field terminator [none]:

Enter the file storage type of field price [money-null]:
Enter prefix-length of field price [1]:
Enter field terminator [none]:

Enter the file storage type of field advance [money-null]:
Enter prefix-length of field advance [1]:
Enter field terminator [none]:

Enter the file storage type of field royalty [int-null]:
Enter prefix-length of field royalty [1]:
Enter field terminator [none]:

Enter the file storage type of field ytd_sales [int-null]:
Enter prefix-length of field ytd_sales [1]:
Enter field terminator [none]:

Enter the file storage type of field notes [char]:
Enter prefix-length of field notes [0]:
Enter length of field notes [200]:
Enter field terminator [none]:

C:\Program Files\Microsoft SQL Server\80\Tools\Binn>


Gustavo Larriera, MSFT MVP-SQL
Uruguay LatAm

This message is provided "AS IS" with no warranties expressed or implied,
and confers no rights.


"Mario" wrote in message
news:0a0401c3cee3$e60a5240$
Sres, he intnetado devarias formas, pero no han dado
resultado.
¿Como se usa el BCP con una "query"?

bcp [Table|view|"query"]

alguien tiene un ejemplo que funcione?


gracias
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida