dcsimg
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: Creating Defaults using Column Names

  1. #16
    Join Date
    Sep 2002
    Posts
    5,938
    The issue is that if you create Distributiondate as computed column, you can't input value for that column. In your case, it'll be same as Invoicedate. Is it what you like to do? If so, why need two columns in the table with same data?

  2. #17
    Join Date
    Feb 2006
    Posts
    13
    Yes, it is okay that we can't input the value for that column as long as it default as per invoice date field.

    This how our Front end designed their software separating the invoice date and distribution.

    Thanks and regards,

  3. #18
    Join Date
    Sep 2002
    Posts
    5,938
    Then you can create it like:

    create table t
    (
    Invoicedate datetime,
    Distributiondate as Invoicedate,
    ...
    )

  4. #19
    Join Date
    Feb 2006
    Posts
    13
    I can't create another table. The distribution date is also connected to other tables. May you please give other advise. Please help. Thanks again.

  5. #20
    Join Date
    Sep 2002
    Posts
    5,938
    I didn't ask you to create another table, just give you sample code on how to create column as computed column. Try modify the column in enterprise manager.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •