Hi,
Can anyone tell me how to convert hex to decimal conversion only through sql (don't want to create function). I tried 2 things first one worked when I pass value physically but second one got error message
1)
select x'80512b5e'::bigint as f
Results are : -2131666964
Above one worked well
2)
create table hello(num int, name char(15));
insert into hello values(1,'80f157ec');
select name::bigint as DecimalVallue from hello
Getting below exception when i issue above sql command
Error: Bad int8 external representation "80f157ec"
Any thoughts how to do that ?
Thanks
Sri
Start Free Trial