General information
Forum:
Microsoft SQL Server
You could chage your code to...
CREATE PROCEDURE test AS
declare @sqltext varchar(200)
SET @sqltext = 'select * from account where myfield = ''test'''
EXEC( @sqltext )
and it should compile.
BOb
>I just tried creating a new procedure which referenced a bogus field name (this is using the enterprise manager interface).
>
>CREATE PROCEDURE test AS
>select * from account where myfield = 'test'
>
>The error says Error: 207 Invalid column name 'myfield'
>
>Like I said, this is normal for me. I have always taken the default settings upon installing SQL 7.0.
>
>Guy
>
>
>>What error are you seeing? Hmmm...I wonder...Is the database compatibility set to 6.5?
>>
>>-Mike
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only