Populating a field (full colunm)

Results 1 to 2 of 2

Thread: Populating a field (full colunm)

  1. #1
    Join Date
    Dec 1969

    Default Populating a field (full colunm)

    hi i am trying to pre-popullate several a fields that have the &#060;null&#062; value in the in SQL Server... i am trying to replace it with the value &#039;0&#039;<BR><BR>The table is cpa_tbl and the fields are:<BR>ifyestick, hascopy, local_authority (and several other fields)<BR><BR>I have tried a INSERT INTO statement but it only adds ONE new feilds thats all.. but i am trying to poppulate records that already exists.. i hope you understand... <BR><BR><BR>if anyone can help it will be something i will learn and helpful.<BR><BR>Kind Regards

  2. #2
    Join Date
    Dec 1969

    Default RE: Populating a field (full colunm)

    You have to do an update instead of an insert<BR><BR>"update tablename set field=0 where field is null"<BR><BR>where field is the name of the field you want to change.

Posting Permissions

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