Emulate REGEXP like behaviour in SQL

前端 未结 5 518
野趣味
野趣味 2020-12-22 05:47

I\'ve posted this question on the new dba.stackexchange.com (please, let me know if I have to delete one).

I\'m working on a DB2 database, and as far as I can see re

5条回答
  •  伪装坚强ぢ
    2020-12-22 06:27

    Well, the article you referenced is specifically addressing your question - bringing RegEx power to DB2. DB2 is IBM's product, no? If IBM says you need to use an add-in library then chances are you need to use an add-in library.

    Standard ANSI SQL, which is all you can count on for sure (and even that not 100%) from a database, does not support anything remotely RegEx.

    Oracle provides external libraries to use for RegEx querying. Sql Server does not but allows you to link in your own .NET libraries. If the mfg. of your db is providing information and links on how to use a specific external library, that is probably your best bet to follow.

    With a standard SQL statement, the only matching you can do is simple wildcard matching.

    Getting a handle on extensibility would be in your best interest anyway, as once you know how to do this, you can wildly extend the functionality of your database to do almost any kind of querying you could possibly want.

提交回复
热议问题