Alvin's Big Data Notebook
There are no rules, just tradeoffs
Friday 1 August 2014
Remove End Numeric from String Column in SQL Server
select SUBSTRING('VOP1', 0, PATINDEX('%[0-9]%', 'VOP1'));
output: VOP
For HiveQL,
split(col_name,'_')[1]
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment