• Good find, Matt!

    I completely forgot / overlooked that quotename takes a sysname parameter.

    I used it principally to take care of strings which already have a quote in them. Quotename will double them up, if you know what I mean. o'leary will become 'o''leary'. I guess I can just use the replace function, or write a custom quotename function which is less restrictive than the original!

    Thanks a lot for sharing your find with us. I hope you have fun with your auditing!

    Regards,

    David.