Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Unanswered: Problem with sql query

    Hi there,

    I have a little problem and I don't know how to solve it...

    I have host names at my table like this:

    qn-vlk-106.cable.inet.com
    laiva.computer.com
    dsl-olugw5he4.dial.inet.net
    198.167.130.5

    (query: select hostname from host)

    Is it possible to make sql query that gives following result:

    *****.cable.inet.com
    *****.computer.com
    *****.inet.net
    *****.167.130.5

    So the first part before the period should change to *****

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

    query

    are you familiar with perl?

    install pl/perl and try to write a function that gets the result
    and then use a regualr expression to filter this out.

    then return the other the wished result

    or something like that with a pl/... language on your choice
    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
  •