Re: bcp error when queryout is stored procedure
- From: "Cristian Lefter" <nospam_CristianLefter@xxxxxxxxxxx>
- Date: Thu, 7 Apr 2005 10:47:30 +0300
[code]
alter PROC dbo.P_TMP
AS
BEGIN
SET NOCOUNT ON
SELECT * FROM SYSOBJECTS
END
go
[/code]
It should work.
Cristian Lefter, SQL Server MVP
"vygandas" <vygandas@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:BB661426-5BEE-4420-A122-C875A48500A5@xxxxxxxxxxxxxxxx
>I am receiving an error when executing bcp out and queryout is "exec stored
> procedure". Please see details below:
>
> use workarea
> go
>
> if object_Id('P_TMP') is not null drop proc P_TMP
> go
>
> create PROC dbo.P_TMP
> AS
> BEGIN
> SET NOCOUNT ON
> SELECT * INTO #TMP FROM SYSOBJECTS
> SELECT * FROM #TMP
> END
> go
>
> exec MASTER..XP_CMDSHELL 'BCP "EXEC workarea.dbo.P_TMP" QUERYOUT
> "C:\Temp\TMP.TXT" -c -Ssqldev -N'
>
> ------------
> Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
> '#TMP'.
>
>
.
- References:
- bcp error when queryout is stored procedure
- From: vygandas
- bcp error when queryout is stored procedure
- Prev by Date: Re: How can I tell if a database is in the middle of a backup?
- Next by Date: SQL Server Maintenance Plan and Map Network Drive Problem (pls reply me soon)
- Previous by thread: Re: bcp error when queryout is stored procedure
- Next by thread: RE: bcp error when queryout is stored procedure
- Index(es):
Relevant Pages
|