I seem to be having issues with MS Access in the following query based on a SAGE database
The following code does not work - it doesn't like the "NOT like" part
SELECT tran_number, Inv_ref, Details, date, Net_amount, amount_paid
FROM AUDIT_HEADER
WHERE type = 'BP' and
deleted_flag= 0 and details NOT like "*WAGES*"
This code does work but is very slow and doesn't work when I link it to excel -
parameters expected = 1 error??
SELECT tran_number, Inv_ref, Details, date, Net_amount, amount_paid
FROM AUDIT_HEADER
WHERE type = 'BP' AND deleted_flag= 0 and
details NOT IN (SELECT details from audit_header where details like "*WAGES*");
Also, bizarrely, this code works, but obviously, I want to exclude transactions that include WAGES in the details
SELECT tran_number, Inv_ref, Details, date, Net_amount, amount_paid
FROM AUDIT_HEADER
WHERE type = 'BP' and
deleted_flag= 0 and details like "*WAGES*"