Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009
    Posts
    79

    Unanswered: Help required in a Update query

    Hi All,

    I have a sql database table named mydata and there is column in the same database table named document type now I want to write a update query which will loop through all the records of document type column and where ever there is no record or blank .i.e. it's null then it will enter "others" text over there. Can anyone help me with this query, If yes, please provide me an example.

    Thanks a lot for your help in advance.

  2. #2
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    Code:
    update table
    set col = 'others'
    where (some_col = ''
          or some_col is null)
    Dave

  3. #3
    Join Date
    Sep 2009
    Posts
    79

    help required in a Update query

    Thanks a lot.

Posting Permissions

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