Database Reference
In-Depth Information
Figure 14.5
REGEXP_REPLA
CE and Changing
Song Titles.
That is the rudimentary basics of regular expressions. It is strongly sug-
gested that if you want to use regular expression functions and syntax, that
you do more research first. The point is made that Oracle SQL now has reg-
ular expression capability. Now let's look at the Oracle Expression Filter.
14.3
Oracle Expression Filter
Oracle Expression Filter in its simplest form allows application of generi-
cally formed WHERE clauses stored in a table. The easiest way to explain
this concept is to demonstrate it functioning. Let's start off by creating a
view against the MUSIC data warehouse schema SALES table, plus some of
the dimension tables. Three important attributes are highlighted; why will
soon be explained.
CREATE OR REPLACE VIEW SALESDATA AS(
SELECT S.SALES_ID AS SALE, G.GENRE AS GENRE
, CT.NAME AS CONTINENT , CY.NAME AS COUNTRY
, S.SALE_PRICE, S.SALE_QTY
, TO_NUMBER(TO_CHAR(S.SALE_DATE, 'MM')) AS MONTH
,TO_NUMBER(TO_CHAR(S.SALE_DATE, 'YYYY')) AS YEAR
FROM SALES S JOIN MUSICCD M ON(S.MUSICCD_ID = M.MUSICCD_ID)
 
Search WWH ::




Custom Search