Insert Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeenajos
    New Member
    • Oct 2007
    • 71

    #1

    Insert Query

    Hi all,
    I just want to insert a date in the column where it is null.I tried a query but its not working.

    INSERT INTO TotalMessages
    (ReqDate)
    VALUES ('2/25/2008')
    WHERE reqdate = NULL

    Error near where clause.

    Thanks in advance.

    Regards.
  • deepuv04
    Recognized Expert New Member
    • Nov 2007
    • 227

    #2
    Originally posted by jeenajos
    Hi all,
    I just want to insert a date in the column where it is null.I tried a query but its not working.

    INSERT INTO TotalMessages
    (ReqDate)
    VALUES ('2/25/2008')
    WHERE reqdate = NULL

    Error near where clause.

    Thanks in advance.

    Regards.

    you can not do that

    use update statement

    update TotalMessages set ReqDate = '2008-02-25' where reqdate is null


    thanks

    Comment

    • jeenajos
      New Member
      • Oct 2007
      • 71

      #3
      insert

      Thank You for the help.

      regards

      Comment

      Working...