April 21, 2006 at 1:57 am
On SQL Server 7 :
ALTER TABLE dbo.EstDealDetail ALTER COLUMN FundNo SmallInt
gives
Incorrect syntax near 'COLUMN'
The table and column exist and FundNo currently is TinyInt
Help !!
April 21, 2006 at 2:53 am
This seems strange. It works perfectly fine for me. Has to be something else than the syntax, it's just fine. Have you tried that exact statement in QA?
/Kenneth
April 21, 2006 at 2:57 am
Thanks for the response.
Yes. Copied directly from QA. Neither I nor a couple of colleagues could see anything wrong, hence the posting.
April 21, 2006 at 3:01 am
Just in case of a simple typo, I edited the posted code to :
SELECT FundNo FROM dbo.EstDealDetail
That runs fine.
April 21, 2006 at 4:39 am
Would this work or produce the same error? (alter is copied from first post)
use tempdb
go
create table dbo.EstDealDetail ( FundNo tinyint not null )
go
insert dbo.EstDealDetail select 1
go
ALTER TABLE dbo.EstDealDetail ALTER COLUMN FundNo SmallInt
go
/Kenneth
April 21, 2006 at 4:45 am
Gives the same error.
I just tried it on a different server though and it worked fine!
Both are Windows Authentication and Ive ensured that Ive got every permission in sight on the database and the table.
April 21, 2006 at 5:52 am
Then check the db compat level. If it's < 70 you'll see this error.
/Kenneth
April 21, 2006 at 6:02 am
Brilliant !!!
Its 6.5
Not 'my' database so I didnt think to check.
Many thanks for your help.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply