Then you need to write one function which will convert Long to varchar2 and using that function you would be able to achieve.