hi..
i'm having a table called "Survey". Whenever user create survey, it will store the date and time the survey was created.

CREATE TABLE [dbo].[Survey] (
    [CustomerID] [int] NOT NULL ,
    [SurveyID] [int] IDENTITY (1, 1) NOT NULL ,
    [SurveyTitle] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [SurveyDescription] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
    [DateCreated] AS (getdate()) ,
    [coverletter] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL 
) ON [PRIMARY]

right now..all the survey created by user are the the same for each record..
i guess i shouldn't use getdate()
what should i do to resolve this?
please help...

It should use a type of datetime and a default of getdate(). I think the syntax was this

[DateCreated] [datetime] DEFAULT getdate()

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.