Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Default field value error Sql Server 2008

 Post Reply Post Reply
Author
Hugo Logmans View Drop Down
New Member
New Member
Avatar

Joined: 18 Feb 2011
Posts: 3
Post Options Post Options   Quote Hugo Logmans Quote  Post ReplyReply Direct Link To This Post Topic: Default field value error Sql Server 2008
    Posted: 18 Feb 2011 at 9:22am
This will fail for the value behind DEFAULT. It should be 'P'. You can add this in the editor, but why not add them automatically for string values?

CREATE TABLE [Clients] (
  [id] INTEGER IDENTITY(0,1) NOT NULL,
  [BeconID] INTEGER NOT NULL,
  [Type] CHAR(1) NULL DEFAULT P,
  [Lastname] VARCHAR(100) NULL,
Back to Top
Wagner R. Landgraf View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 2641
Post Options Post Options   Quote Wagner R. Landgraf Quote  Post ReplyReply Direct Link To This Post Posted: 18 Feb 2011 at 10:36am
This is by design.
You can put any expression in default field, it could be constants, so you must put literal values, Data Modeler won't parse the field content just to check which parts need quotes or not.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down