[jira] [Created] (TRAFODION-3253) Add documentation about split_part built-in function

2019-01-03 Thread Yuan Liu (JIRA)
Yuan Liu created TRAFODION-3253:
---

 Summary: Add documentation about split_part built-in function
 Key: TRAFODION-3253
 URL: https://issues.apache.org/jira/browse/TRAFODION-3253
 Project: Apache Trafodion
  Issue Type: Documentation
  Components: documentation
Affects Versions: any
Reporter: Yuan Liu
 Fix For: any


Currently we support split_part built-in function ,but it is not documented.

 

SQL>select split_part('我:@你:@他',':@',1) from dual;

(EXPR)
--
我

--- 1 row(s) selected.

 

SQL>select split_part('aaa:bbb:ccc',':',3) from dual;

(EXPR)
---
ccc

--- 1 row(s) selected.

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (TRAFODION-3136) Improve on split_part builtin-function

2019-01-03 Thread zhang.lei (JIRA)


 [ 
https://issues.apache.org/jira/browse/TRAFODION-3136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

zhang.lei resolved TRAFODION-3136.
--
Resolution: Resolved

> Improve on split_part builtin-function
> --
>
> Key: TRAFODION-3136
> URL: https://issues.apache.org/jira/browse/TRAFODION-3136
> Project: Apache Trafodion
>  Issue Type: Improvement
>Reporter: zhang.lei
>Assignee: zhang.lei
>Priority: Major
>
> {color:#FF}use like below descripyon:{color}
>  
> >>select split_part('sa:sbl:sc', ':', 1) from t038sf;
> (EXPR)
> -
> sa
> --- 1 row(s) selected.
> >>select split_part('sa:sbl:sc', ':', 2) from t038sf;
> (EXPR)
> -
> sbl
> --- 1 row(s) selected.
> >>select split_part('sa:sbl:sc', ':', 3) from t038sf;
> (EXPR) 
> -
> sc 
> --- 1 row(s) selected.
> >>
> >>-- **ERROR** 
> >>select split_part('sa:sbl:sc', ':', 0) from t038sf;
> *** ERROR[4497] The Third operand of split_part must be greater than 0
> --- 0 row(s) selected.
> >>–**EMPTY RESULT**
> >>select split_part('sa:sbl:sc', ':', 4) from t038sf;
> (EXPR) 
> -
>  
> --- 1 row(s) selected.
>  
> >> create table T038sf(a int, b char(10), c varchar(30));
> >>insert into T038sf values(110, 'a/b/c', 'sa/dsd/s');
> --- 1 row(s) inserted.
> >>insert into T038sf values(111, 'sasd', 'dsa:/~sd');
> --- 1 row(s) inserted.
> >>insert into T038sf values(112, '#$%$#@', 'dsassad');
> --- 1 row(s) inserted.
> >>insert into T038sf values(114, 'a', '这是^中文:测试');
> --- 1 row(s) inserted.
> >>select split_part(c, '/', 2) from t038sf;
> (EXPR) 
> --
> dsd 
> ~sd 
>  
>  
> --- 4 row(s) selected.
> >>select split_part(c, 'ggg', 2) from t038sf;
> (EXPR) 
> --
>  
> gsad
> --- 4 row(s) selected.
> >>select split_part(c, 'sd', 1) from t038sf;
> (EXPR) 
> --
> sa/d 
> dsa:/~ 
>  
>  
> --- 4 row(s) selected.
>  
> >>select split_part(c, ':', 1) from t038sf;
> (EXPR) 
> --
>  
> 这是^中文
> --- 4 row(s) selected.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)