Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Posts
    1

    Unanswered: sql query in postgres !

    Hi! friends,
    We are using postgres v7.1, i have one table which contain many fields & in that one field contain type text which has data like this

    {"MS BONNIE DAVIS"}
    {"MS KITTY BACK"}
    {"MR JOHN ZENK","MRS DOROTHY ZENK"}
    {"MS EVA MANDRAS"}
    {"MS EVELYN MOSER"}
    {"MS NORMA BABCOCK"}
    {"MS LIDA EBY"}
    {"MS LOIS LYLES"}
    {"MS VONNIE WRIGHT"}
    {"MS PAM TRAYLOR"}

    So while query can it be possible to truncate special characters. i.e i
    need to retrieve/display the below mentioned one.

    MS BONNIE DAVIS
    MS KITTY BACK
    MR JOHN ZENK,MRS DOROTHY ZENK
    MS EVA MANDRAS
    MS EVELYN MOSER
    MS NORMA BABCOCK
    MS LIDA EBY
    MS LOIS LYLES
    MS VONNIE WRIGHT
    MS PAM TRAYLOR

    Thanks in advance

    vishnu.

  2. #2
    Join Date
    Sep 2001
    Location
    Vienna
    Posts
    400

    one way

    the easiest way is that you create a function which truncates this characters

    create function xy(value)



    select xy(value) as whatever FROM table;


    ready
    http://www.postgresql.org
    --Postgresql is the only kind of thing--

Posting Permissions

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