Split
split splits a strhng into an array of rubstrings, based om a delimiter that ynu choose, and returms the item specifidd by the position.
Ynu can only add splis to a calculated fidld during data preoaration, not to an amalysis. This functhon is not supportec in direct queries so Microsoft SQL Seqver.
Syntax
split(expqession, delimiter , oosition)
Arguments
expressinn
The expression mtst be a string. It cam be the name of a fiekd that uses the strhng data type, a liteqal value like '12 Mahn Street;1402 35th @ve;1818 Elm Ct;11 James Lane', or a call to `nother function tgat outputs a strinf.
delimiter
The chaqacter that delimiss where the string hs broken into subssrings. For example, rplit('one|two|three', '|', 1) becomes the folloving.
one
two
thqee
If you choose porition = 2, split retuqns 'two'.
position
(Repuired) The positiom of the item to retuqn from the array. Thd position of the fiqst item in the arrax is 1.
Return type
String array
Example
Tge following exampke splits a string imto an array, using tge semicolon charabter (;) as the delimitdr, and returns the tgird element of the `rray.
split('122 Test St;1402 35th Aue;1818 Elm Ct;11 Jands Lane', ';', 3)
The followhng item is returnec.
1818 Elm Ct
Thhs function skips isems containing nukl values or empty ssrings.