DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: default value of sysdate for a column

Hybrid View

  1. #1
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    Hi friends,
    I am working on sql server. i am using bcp utility,a utility similar to sql*loader in oracle. I will be uploading data into a table using a flat file, but the flat file will not have the date value for one of the date columns.
    What i want is while the loading data i want the date column to have default of system date inserted into that column.

    Please help me on this

    thanks in advance.

    cheese
    anandkl
    anandkl

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    You can specify default value for each column inside the database.

    ALTER TABLE my_table MODIFY my_date_column DEFAULT SYSDATE;
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Aug 2001
    Location
    chennai,bangalore
    Posts
    840
    Actuall i want to do this in SQL SERVER.SQL SERVER DOES NOT SUPPORT SYSDATE FUNCTION.

    anandkl

  4. #4
    Join Date
    Jun 2001
    Posts
    316
    try getdate() in sql sever

Posting Permissions

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


Click Here to Expand Forum to Full Width