Eric and Tom: thank you very much for your help, I
will try your suggestions tomorrow at work.
The sql statements are issued from a COBOL program,
which can also issue the same statements to other
databases (MySQL, MS SQLServer), so the first thing Im
going to do is trying to change the encoding setup,
which would be the most homogeneous solution that
wouldn't interfere with the other databases, that
currently handle well those strings with hexadecimal
Thank u very much again!
--- Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Luciano <ldelio(at)yahoo(dot)com> writes:
> > I am having a problem doing a query with
> > characters through ODBC. The hexadecimal
> > are inside a character filed. It would be
> > like:
> > SELECT * FROM MYTABLE WHERE COLUMN1 < 'XXXXXX'
> > but instead of the X's there are x'FF'
> > The query is accepted, but the result is not
> > consistent... it returns an empty result set. Does
> > anyone know if I'm missing something?
> I suspect you are spitting byte sequences at the
> backend that are
> illegal in the character set encoding you've
> selected. Check your
> locale and database encoding setup. C/SQL_ASCII is
> the best bet
> if you want to pretend that you can store any random
> byte sequence
> in a character field.
> Plan B, which would probably be better in the long
> run, is to store
> that data in a bytea field instead, and send escaped
> (ie \\377 rather than an actual FF byte).
> regards, tom lane
> ---------------------------(end of
> TIP 8: explain analyze is your friend
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
In response to
pgsql-odbc by date
|Next:||From: Sim Zacks||Date: 2005-01-11 14:08:56|
|Subject: Re: MS Access problem with memos|
|Previous:||From: Tom Lane||Date: 2005-01-10 23:05:20|
|Subject: Re: Query with hexadecimal characters |