Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unanswered: Strange select behaviour, please support

    Hello,

    I have a specific problem with postgres's select. See below:

    ldsdb=# select tn from sup where tn like '1410888888%';
    tn
    ------------
    1410888888
    (1 row)

    ldsdb=# select tn from sup where tn = '1410888888';
    tn
    ----
    (0 rows)

    Can someone explain me why is this happening that I cannot select without like even it looks there are no characters after the tn?

    After I update the record it is found:
    ldsdb=# update sup set tn = '1410888888' where tn like '1410888888%';
    UPDATE 1
    ldsdb=# select tn from sup where tn = '1410888888';
    tn
    ------------
    1410888888
    (1 row)

    So what's going on there?

    Regards,
    Tomasz

  2. #2
    Join Date
    Jun 2010
    Posts
    2
    O got it,

    It was error in the code which was updating column and was set as binary in prepare statement.

    Thanks for looking,
    Tomasz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •