create a single sql function to open any files