Skip to content

The GET_FIELD is an oracle SQL function to extract, from a string composed by fields separated by a separator, a specific field in a specific position.

License

Notifications You must be signed in to change notification settings

gpalleschi/GET_FIELD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

GET_FIELD


Description :

The GET_FIELD is an oracle sql function very efficent, created under GNU General Public License v3.0 to
extract from a string with fields separated by a one or more characters a specific field by its position,
if is not present function return null.

Function have three input arguments :

  1. Input String
  2. Separator String (It is possible specify more than a single character)
  3. Field Number

Function returns null if it's impossible determinate field at position specified in Field Number


Compatibility :

ORACLE 8 or upper


Samples :

       GET_FIELD( '1|2|3|4','|',2 )

       result:
       ----------
       2  


       GET_FIELD( 'ARA;BAR;COO;SAA',';',5 )

       result:
       -----------
       null  

License :

This project is licensed under the GNU GENERAL PUBLIC LICENSE 3.0 License - see the LICENSE file for details

About

The GET_FIELD is an oracle SQL function to extract, from a string composed by fields separated by a separator, a specific field in a specific position.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages