0

With this DDL ("BLA" is a tablename in the form "CCR130329093342")

ALTER TABLE BLA ADD salvation float NOT NULL WITH DEFAULT

...I'm getting, "There was an error parsing the query. [Token line number, Token line offset,, Token in error,,]"

Okay, then, which line number? offset? It knows/thinks there's a problem, but can't or won't say what or where.

Is there anything obviously wrong with this DDL? Should it be this instead:

ALTER TABLE BLA ADD salvation float NOT NULL WITH DEFAULT 0.0

?

UPDATE

If I revert the DDL back to the original simple type (without adding "NOT NULL", simply "alter bla add blah nvarchar(12)" I don't get the "query could not be parsed" msg except in the one that declares a float (shown above)...does SQL-Server-CE hate on floats, or...???

B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862

1 Answers1

3

default needs a value:

alter table bla add salvation float not null with default(0.0)
Moho
  • 15,457
  • 1
  • 30
  • 31