Skip site navigation (1) Skip section navigation (2)

Hex to char

From: "Andrew Bartley" <abartley(at)evolvosystems(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Hex to char
Date: 2004-07-22 03:23:25
Message-ID: CAEAIPJHMAFOJGDANDACEELKFAAA.abartley@evolvosystems.com (view raw or flat)
Thread:
Lists: pgsql-general
Hi all,

I wish to do something like this

select chr(x'22')
result "

But using a column from a table as the argument

eg

create table test
(
hex_value	char(2)
)

insert into test values ('22')

select chr(hex_value) from test; ( I understand this won't work, but I need
something like it )

I have looked at all of the string functions but can't find a solution short
of writing my own function.

We are on 7.2.1

Thanks

Andrew


pgsql-general by date

Next:From: Kevin MacdonaldDate: 2004-07-22 04:34:26
Subject: Table access method not behaving like Oracle (index vs sequential scan). Examples and stats provided.
Previous:From: Grant McLeanDate: 2004-07-22 02:15:04
Subject: Re: Locking with foreign key constraints

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group