How delete all the registers from a field

DarkHorseDarkHorse Member Posts: 389
Hi everybody; sometimes I've to delete a field from a table, but if it has data it says that isn't possible to delete it if all the registers are not erased, then I've to delete them one by one. Is there any way to delete the registers from a field automatically?.
Thanks in advance.

Comments

  • arcullarcull Member Posts: 191
    HI, I don't understand what are you trying to do. Do you want to delete the data that is one of the fields of certain table, or do you want to delete the field in the design mode? Which table and which field is that you're refering to?
  • ritesh.singhritesh.singh Member Posts: 123
    DarkHorse wrote:
    Hi everybody; sometimes I've to delete a field from a table, but if it has data it says that isn't possible to delete it if all the registers are not erased, then I've to delete them one by one. Is there any way to delete the registers from a field automatically?.
    Thanks in advance.

    It would be very helpful if you could provide the name of the table you want to delete the data from?
    any of the masters should not be deleted but blocked.
    Deletion from the transaction table may cause awkward behaviour of the system.
    Thanks,
    Ritesh K Singh
  • DarkHorseDarkHorse Member Posts: 389
    Thanks for reply; sorry if I don't explain myself well. I want to delete a field that I've created from a table (Customer table in this case) because I don't need it. But this field has records, then if I try to delete it from Design the system says to me that "You can't delete a filed that has records", then I have to run the table and go register by register and erasing the records of this field, what is a difficult task if there are many records.
    By this reason, I'd like to know if there is a kind of process that delete all the registers automatically from any table.
    Thanks in advance.
  • MBergerMBerger Member Posts: 413
    It's possible with just one line of code, using Modifyall.
  • DarkHorseDarkHorse Member Posts: 389
    Thanks for reply, but can you tell me what code please?.
    Thanks in advance.
  • ritesh.singhritesh.singh Member Posts: 123
    DarkHorse wrote:
    I want to delete a field that I've created from a table (Customer table in this case)

    Which field is this and which register do you delete??

    you can write a batch processing report where you can select the record from which you want to delete the field and then check for any available "Register" attached to that field delete all and then delete the field.

    "I hope you know what you are doing".
    Thanks,
    Ritesh K Singh
  • SavatageSavatage Member Posts: 7,142
    a quick report is the easiest.

    based on the customer table..
    onaftergetrecord
    clear("your field");
    modify;
  • DarkHorseDarkHorse Member Posts: 389
    Ok!!, thanks for help. I'll test it.
    Thanks again.
Sign In or Register to comment.