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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: SELECT Problem mit LIKE



"Daniel Seichter" <dseichter(at)radiomatic(dot)com> writes:

> Hallo Andreas
>
>> Wie sehen denn die DDL-Statements aus? Auf dem ersten Blick sieht es
>> nach einem char-vs-varchar-Problem aus.
>
> CREATE TABLE "public"."artikel" (
>   "artikel" CHAR(12) NOT NULL, 

Aus <http://www.postgresql.org/docs/8.1/static/datatype-character.html>:

| values of type character will be space-padded; values of type
| character varying will simply store the shorter string.

Also entweder mit dem LIKE auch auf die Leerzeichen matchen, oder ein
varchar daraus machen a la

    alter table artikel alter artikel type varchar(12);

Gruß
Andreas



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group