OVH Cloud OVH Cloud

Conversion...

2 réponses
Avatar
olivier
Bonjour,

j'effectue ces requétes :



select LD_String_Translation_Id

from LD_String_Translation

where LD_String_Translation_Id = 0x800000000000124D



et celle ci :



select LD_String_Translation_Id

from LD_String_Translation

where LD_String_Translation_Id in(

select

cast('0x' + col008 as char(18))

from [extraction form string])



dans un cas cela marche (le premier) et dans l'autre non.



sachant que col008 contient 800000000000124D.



Comment faire Merci..??

2 réponses

Avatar
bruno reiter [MVP]
dans le cas 2, malgré ce que tu voudrais tu as un string et non un binaire,

je pense que tu dois créer une fonction pour transformer ton string en
binaire en travaillant sur les paires de caractères . Attention aux
performances!

br


"olivier" wrote in message
news:#
Bonjour,

j'effectue ces requétes :



select LD_String_Translation_Id

from LD_String_Translation

where LD_String_Translation_Id = 0x800000000000124D



et celle ci :



select LD_String_Translation_Id

from LD_String_Translation

where LD_String_Translation_Id in(

select

cast('0x' + col008 as char(18))

from [extraction form string])



dans un cas cela marche (le premier) et dans l'autre non.



sachant que col008 contient 800000000000124D.



Comment faire Merci..??




Avatar
olivier
Bonjour,

merci pour ta réponse mais le problème est que si je convertie par exemple
cette valeur : 800000000000124D qui est stockée sous ce format dans sql :
0x800000000000124D j'obtient :
0x383030303030303030303030313234440000000000000000000000000000 ce qui n'est
pas correct même en prenant deux caractéres cela donne la même chose ce qui
est logique...

Donc je ne vois pas comment faire du tout.

"bruno reiter [MVP]" <remove.this! a écrit dans le message
de news:
dans le cas 2, malgré ce que tu voudrais tu as un string et non un


binaire,

je pense que tu dois créer une fonction pour transformer ton string en
binaire en travaillant sur les paires de caractères . Attention aux
performances!

br


"olivier" wrote in message
news:#
> Bonjour,
>
> j'effectue ces requétes :
>
>
>
> select LD_String_Translation_Id
>
> from LD_String_Translation
>
> where LD_String_Translation_Id = 0x800000000000124D
>
>
>
> et celle ci :
>
>
>
> select LD_String_Translation_Id
>
> from LD_String_Translation
>
> where LD_String_Translation_Id in(
>
> select
>
> cast('0x' + col008 as char(18))
>
> from [extraction form string])
>
>
>
> dans un cas cela marche (le premier) et dans l'autre non.
>
>
>
> sachant que col008 contient 800000000000124D.
>
>
>
> Comment faire Merci..??
>
>