More sane SQL variables parsing