在特定专栏中,我想处理管道函数并同时使用 concat 函数。我怎样才能做到这一点?下面查询
In a particular column, I want to handle pipe function as well as make use of a concat function at the same time. How can I achieve this? Query below
select regexp_replace(id,'["\t\n|]', '') as CONCAT('SF_',id) as id
,lastmodifiedbyid
,lastmodifieddate
from Enterprise_raw
您可以将一个函数包装到另一个函数中:
select concat('SF_',regexp_replace(id,'["\t\n|]', '')) as id,
,lastmodifiedbyid
,lastmodifieddate
from Enterprise_raw
select regexp_replace(id,'["\t\n|]', '') as CONCAT('SF_',id) as id
,lastmodifiedbyid
,lastmodifieddate
from Enterprise_raw
您可以将一个函数包装到另一个函数中:
select concat('SF_',regexp_replace(id,'["\t\n|]', '')) as id,
,lastmodifiedbyid
,lastmodifieddate
from Enterprise_raw