0

delete x qty of records

Any suggestion why this script below has been accepted but not worked ?

What is has done is instead of deleting x records it has delete all the records in the table DEJOBS

I just want to delete only selected batch of records based on the match of 2 conditions  from a button script!

script is ........  delete select DEJOBS where 'Jobstatus' = "cancelled" and OrderDate <= 22/01/2015

Fortunatley when testing I do anything effecting deleting/modifying large chunks of data in my play copy 

thanks 

Mel

2 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    I would try to put the date in a variable :

    let d := date(22/01/2015);

    delete (select DEJOBS where text(Jobstatus) = "cancelled" and Orderdate <= d)

    Steven

    • Mel_Charles
    • 3 yrs ago
    • Reported - view

    Hi Steven

    Thanks - will give this a go and let you know

    kind regards

    Mel

Content aside

  • 3 yrs agoLast active
  • 2Replies
  • 374Views