Re: Problems creating stored procedure using command text
From: Grzegorz Danowski (gdn_at_usuntopoczta.onet.pl)
Date: 10/11/04
- Next message: Hermit Dave: "Re: Display of Command execution."
- Previous message: news.microsoft.com: "Display of Command execution."
- In reply to: Paul Say: "Problems creating stored procedure using command text"
- Next in thread: Paul Say: "Re: Problems creating stored procedure using command text"
- Reply: Paul Say: "Re: Problems creating stored procedure using command text"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 11 Oct 2004 12:25:53 +0200
Użytkownik "Paul Say" <saywin@tpg.com.au> napisał w wiadomości
news:%23ieRdZyrEHA.2008@TK2MSFTNGP12.phx.gbl...
>I am trying to write a program to create a database by executing the T-SQL
>statments for the databases Tables, Views Stored Procedures etc. I have a
>file that contains all the T-Sql Script. The program I have written will
>create the tables ok, the views and even some of the stored procedures
>however any stored procedures like the one listed will not execute as the
>quotes seem to cause a problem. The error I get for example says invalid
>Column name 'Select l.x, c.vendor', i ge this for each quoted line.
>
> Stored Procedure
>
> /****** Object: Stored Procedure dbo.RPF_CommitmentItem_GetAll Script
> Date: 8/10/2004 4:17:04 PM ******/
> CREATE PROCEDURE RPF_CommitmentItem_GetAll
> @Coid int,
> @CommitmentId nvarchar(12),
> @Filter nvarchar(500) = '1=1'
> AS
> Declare @SQL nvarchar(500)
> SET @SQL = "Select i.*, c.Vendor "
(...)
Try use ' instead of "
Set @SQL = 'Select i.*, c.Vendor '
etc.
Grzegorz
- Next message: Hermit Dave: "Re: Display of Command execution."
- Previous message: news.microsoft.com: "Display of Command execution."
- In reply to: Paul Say: "Problems creating stored procedure using command text"
- Next in thread: Paul Say: "Re: Problems creating stored procedure using command text"
- Reply: Paul Say: "Re: Problems creating stored procedure using command text"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|