I am getting run time error. I have run similar query in a different db that works fine not sure why this one is giving me error. Initially it gave me syntax error but when