phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Afshin Moazami <>
Subject How to create a view with case
Date Mon, 21 Dec 2015 20:42:16 GMT
I am trying to create a view on a table in Apache Phoenix and add/change the values of one
of the base table columns in the view.

Something like this:

CREATE VIEW mobile_product_metrics (new_col varchar) AS
(CASE metric_type WHEN 'm' THEN 'mobile'
WHEN 'p' THEN 'phone'
ELSE 'unknown' END ) AS new_col
FROM product_metrics;

I am wondering if this is supported by Phoenix.

View raw message