Thanks for the suggestion. Tried below and still no luck.
PARAMETERS IDFilter Long;
SELECT AttachmentTable.ID, AttachmentTable.ItemID, AttachmentTable.AttachmentType,
AttachmentTable.AttachmentName, AttachmentTable.Default, AttachmentTable.Deleted
FROM AttachmentTable
WHERE...