Hi,

The "position" function works on varchar data, not binaries. So if you pass
a binary, it is first converted to a varchar (by using the hex
representation).

Regards,
Thomas


On Tue, Nov 4, 2014 at 5:43 AM, Jiunn Jye Ng <[email protected]> wrote:

> Hi All,
>
> I am testing the position function against blob column.
> The blob values are represented as pair of hex for each byte.
>
> my expectation is the position function should return the index value
> relative to the pairing.
>
> sql> select position (x'aa' , x'aabbcc') from dual;
> result              : 1
> expected result: 1 (ok)
>
> sql> select position (x'bb' , x'aabbcc') from dual;
> result              : 3
> expected result: 2
>
> sql>select position (x'cc' , x'aabbcc') from dual;
> result              : 5
> expected result: 3
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to