2

In a SQLAnywhere 11 database, I have a string field called "domain" that contains data that looks like:

stats.ebay.com
103814.agchurges.org

I need to query the table to retrieve the domains but also filter it so that any subdomains are removed.

ebay.com
agchurges.org
Mike Gardner
  • 6,611
  • 5
  • 24
  • 34
Amit
  • 21
  • 1
  • 1
    http://stackoverflow.com/questions/8038954/sql-new-column-with-pattern-match should point you in the right direction. It's important to note that most people don't recommend don't recommend string manipulation in SQL, as it's not built for it. That is better done on the front end of your application, or through an external script. – Mike Gardner Apr 15 '14 at 14:42

0 Answers0