Re: ADO error



Hmm, another dig around shows that SQL Server should handle it as optional.
I'll try some tests here on my servers.

Dan

Daniel wrote to kayal on Thu, 15 Jun 2006 15:57:01 +0100:

SQL Server's syntax hasn't changed - the docs for v7 to 2005 all show that
it's ALTER TABLE [tablename] ADD <column_definition>

While the ANSI 92 standard defines the keyword COLUMN after the ADD as
optional, SQL Server doesn't allow it. SQL Server is not fully ANSI 92
compliant.

Dan

kayal wrote on Thu, 15 Jun 2006 05:49:02 -0700:

ya it worked like charm.
thanx.but y is the original syntax changed here in ms sql?

"Daniel Crichton" wrote:

kayal wrote on Thu, 15 Jun 2006 02:42:01 -0700:

"Incorrect syntax near the keyword 'COLUMN' statement(s) could not be
prepared. deferred prepare could not be completed"

can anyone please help me with this error which i get while trying to
add a column to my table.

query "alter table release add column email varchar(2));"

It would help if you specified the database server you're using too.
Assuming MS SQL Server, your problem is that you've put "column" in the
statement - with ALTER TABLE ... ADD you just specify the column
definition, eg.

alter table release add email varchar(2)

Dan


.



Relevant Pages

  • Re: Use ANSI Join or Old Style Join?
    ... Would you use ANSI style table joining or the 'old ... you specify the join as INNER JOIN or in the WHERE clause. ... Whether and when to specify join conditions using the INNER ... Make sure you specify your SQL Server version and service ...
    (comp.databases.ms-sqlserver)
  • Re: Oracle licence question
    ... SS isn't completely ANSI 92 compliant at ... So, I guess let me rephrase the question - does Oracle have ENTRY, ... INTERMEDIATE and FULL compliance to FIPS 127-2 because I can only find ... SQL Server MVP ...
    (comp.databases.oracle.server)
  • Re: Help on sppeding up a 15,000 line batch process
    ... Since everything's so prorietary, the only interface I ... > SQL server in ANSI format and never use unicode... ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Oracle licence question
    ... I did and I couldn't find the citation, which is why I asked you for it. ... I want to check what level of ANSI compliance MS claims, to validate your claim that their implementation of SQL is somehow more the ANSI standard compliant than Oracle's. ... Oracle - http://www.itjobswatch.co.uk/jobs/uk/oracle.do ... SQL Server - http://www.itjobswatch.co.uk/jobs/uk/sql%20server%20dba.do ...
    (comp.databases.oracle.server)
  • Re: Oracle licence question
    ... What level of ANSI 92 or didn't you know there are different levels? ... SQL Server - http://www.itjobswatch.co.uk/jobs/uk/sql%20server%20dba.do ... you ought to compare Oracle DBA with SQL Server DBA and ... starts to get a bit interesting and bias toward Oracle starts to be shown, ...
    (comp.databases.oracle.server)