Is there any function in SPARQL that converts from HEX to Decimal format? If not, is there any other way we can do this?

asked 30 Jan '13, 10:48

CHANDAN's gravatar image

CHANDAN
1313
accept rate: 0%

edited 30 Jan '13, 15:04

Signified's gravatar image

Signified ♦
23.5k1623


There's no standard SPARQL function that will take a string that represents a number in hex and convert it to a string in decimal notation (or, for that matter, to an xsd:integer). I don't believe you could compose such a function using standard SPARQL built-in functions, either, as you'd need to loop over the characters in the hex representation to do the conversion and there's no looping/mapping standard function in SPARQL.

So, you could write your own custom function if your implementation supports it (as per your other question).

Lee

link

answered 30 Jan '13, 11:41

lee's gravatar image

lee
3.2k39
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1,243
×104
×7

Asked: 30 Jan '13, 10:48

Seen: 598 times

Last updated: 30 Jan '13, 15:04