Sql split string and get second element. Search SSC for 'split function.

Sql split string and get second element Source dataframe stored as TempView in Databricks: ID value 1 value-1,value-2,value-3 2 value-1,value-4 Output n The transformation remains a two-step chained process, leveraging the internal power of split and size without introducing performance overhead. : Jun 22, 2017 · 6 You can use split function and get the first element for new Column D Here is an simple example sql Feb 14, 2014 · The STRING_SPLIT function turns it into a Table that is joined. example: input is: COL 1 sql 13434 test 39480 sql2 39 tests 39 data 123 tests 4587 output should be: COL 1 … I am basically trying to split the following string in Denodo and trying to create new columns in the database for each value. Lets have: Java Scala Groovy Python R GoLang Jun 15, 2018 · We would like to show you a description here but the site won’t allow us. Here you want to omit first, but take second and third. Jul 26, 2021 · I am having a string as follows Test1: Test Exp: Test3 I am trying to extract the string so that the output should be Test1: Test Exp I tried as follows DECLARE @myString NVARCHAR(MAX) = 'Test1: Jul 26, 2021 · I am having a string as follows Test1: Test Exp: Test3 I am trying to extract the string so that the output should be Test1: Test Exp I tried as follows DECLARE @myString NVARCHAR(MAX) = 'Test1: Jan 26, 2024 · In many RDBMS there is a split_part () function which is used to split a string into multiple parts based on a delimiter and return a specific part of the split result. You may notice that I cast both the path column and the space (' ') to nvarchar (max). For example, get username from the string. Aug 25, 2025 · This article walks through how to split delimited strings into rows, process them, and then re-aggregate them back into a single string, all within SQL Server. txt and I want to get a filename. This feature breaks a string into separate values based on a chosen single-character separator and returns them as rows in a table. Parameters : string : Text to be split into parts. Returns NULL if the index exceeds the length of the array. Everything between a pair of square brackets is treated as a list of optional single characters except for named named character classes which expand out to a list of optional characters, however, due to the way character classes nest, it's very Need to break down a string in Oracle into smaller parts? Our easy-to-follow guide provides clear instructions. Basically, I have a file-path /dir1/dir2/dir3/file. delimiter: The character or substring used to delimit the individual items in the string. If you can set an upper bound on the number of URL components, then you can generate that many columns and make them NULL when a particular URL has fewer components. What would be the best way to do this. Description The split() method splits a string into an array of substrings. Master string manipulation in SQL with detailed examples and practical tips. Jun 3, 2022 · What RDBMS are you using (SQL Server, Mysql, Oracle, Snowflake, Postgres, Teradata, MariaDB, etc)? Are there other strings in this column that have different patterns. Must be an integer In my case, I need to split the first on the first appearence of space char. Sep 30, 2024 · The resulting table contains a new column named player_position that contains the last word from each string in the player_info column. May 17, 2018 · 1 Since you are running sql server 2016, you can actually use the new string_split function, and here is a much simpler version using your real data in your comment May 19, 2018 · Can you assume that the result of the string_split function returns elements in order? In short, is the following code correct? DECLARE @tags NVARCHAR(400) = 'clothing,road,touring,bike' DECLARE Oct 23, 2019 · H-01-01-02-01 BLE-01-03-01 H-02-05-1. Replace the Underscore with a Period Replace underscores with periods to transform the string into a format that can be easily split. Next, you can use the . Jul 25, 2025 · Explore effective Oracle SQL methods to transform a single comma-separated string across multiple rows, enhancing data analysis and presentation. Jun 14, 2018 · Regrettfully STRING_SPLIT() does not return the position / index. pyspark. How can I split the string by space and access the item at index 1 which should return "John"? Nov 1, 2018 · Use a split string function, but not the built in once since it will return only the values and you will lose the location data. Jan 10, 2012 · HI, i want a query which give me a second value from comma separated string. The split() method returns the new array. In MySQL, the SUBSTRING_INDEX() function provides the perfect way to split strings […] Changing the model is not an option here. Building on the previous answers, I offer this as a solution - which provides both the first and last elements. Jan 23, 2024 · String-splitting with not all values present Hello. Without these explicit casts, both would be truncated at 4000 characters - similar to the STUFF issue here. We would like to show you a description here but the site won’t allow us. Rank 1 on Google for 'oracle sql split string by delimiter'. It's a great way transform String data into a table. Jul 20, 2023 · I want to split a string and only return the second value to assign to a variable. In the first place, a field should only contain a single Aug 5, 2021 · First: If you have two consecutive spaces, will you consider that as an element (the element being the empty string, which Oracle treats the same as null)? Or do you want one, two or any number of consecutive spaces to be considered as a single separator? Second: what if the input string has fewer than n elements? What do you want to show in the output? 6 days ago · Transact-SQL reference for the STRING_SPLIT function. I need to extract these substrings using any MySQL functions. Definition and Usage The SUBSTRING () function extracts some characters from a string. Returns the 3rd element of {ab, cd, ef, gh}, that is ef. In summary, the SPLIT_PART() function is a useful tool for efficiently processing and analyzing delimited string data in SQL. Finally Sep 6, 2022 · Split string to get all but the last element Asked 3 years, 2 months ago Modified 1 year, 9 months ago Viewed 9k times Jun 4, 2018 · String_Split Inputs Text Type: Text. Jul 22, 2025 · Explore various SQL methods for splitting strings, from custom functions to built-in features like STRING_SPLIT. I don't fully understand how to implement the reverse of answers to the question here: Split string and take last element Dec 30, 2024 · Learn how to parse or split SQL Server strings from one column into multiple columns using the parsename and other T-SQL functions. Feb 4, 2023 · SQL convert comma separated string to listHow do I separate comma separated strings in SQL?How to split comma separated values in Oracle SQL query?How do you Parameters str Column or column name a string expression to split pattern Column or literal string a string representing a regular expression. e. 5 You could use string_to_array to convert your string to array using : as the delimiter to get each element between the delimiter and then specify index of your array to retrieve values. Learn how to split a string in SQL Server with our step-by-step guide. occurrence: The occurrence of the delimiter to split the string. g. If delimiter is a literal, enclose it in single quotation marks. We have code currently which does a loop and lots of instrings plus counting. In this article, we will check Snowflake functions to split string on a delimiter. Rest of the string should be comes as a second string even the second part have more than one space char. How to pick the last word after the last comma. Mar 26, 2025 · In this tutorial, we’ll explore how to split single-column values into multiple columns in different SQL databases, such as MySQL, PostgreSQL, and SQL Server. split () functions. Code: Mar 30, 2022 · Split string and display first character Asked 3 years, 7 months ago Modified 3 years, 7 months ago Viewed 3k times Jul 30, 2024 · Here’s a step-by-step guide on how to implement this: Reverse the String We start by reversing the string to simplify the process of identifying the last part. delimiter : Text representing the delimiter to split by, this can be multiple characters. element_at, see below from the documentation: element_at (array, index) - Returns element of array at given (1-based) index. There is no safe way to get an element by the position with STRING_SPLIT 19 I have a need to create a function the will return nth element of a delimited string. Note: some of my strings are F/O also for which my SQL below works fine and returns desired result. sql. Use it to simplify complex string transformations and enhance the clarity and versatility of your SQL queries. Everything pulls correctly as I want it but I have one field that is a name field in the database. The `SPLIT_PART` function in PostgreSQL is used to split a string into parts based on a specified delimiter and returns the specified part. You'll find several viable options. Generally, it takes three arguments: the input string, the delimiter, and the position of the desired part, start from the left of the string. The question says this will be used as a datasource to my dropdownlist and will always refresh when another dropdownlist changes Parsing for display purposes is the job of the client's data access code, not the database's. Reference Function and stored procedure reference String & binary SPLIT_PART Categories: String & binary functions (General) SPLIT_PART Splits a given string at a specified character and returns the requested part. This parses logs for analysis, enabling temporal queries (Spark DataFrame Datetime). Jul 11, 2019 · SUBSTR - Dynamically spliting the string. Effortlessly separate and manipulate text values. Oct 3, 2022 · To split a string in SQL you can use a built-in function. toCharArray () and . Dec 13, 2023 · This tutorial explains about STRING_SPLIT function in SQL Server that splits the given string into substrings based on the specified delimiter. I can split a value into array of words with Postgres string_to_array or regexp_split_to_array functions, then how to get its last element? The first a normal one to split on ! and the second a modified one to get the different rows using the first value as the first column and the rest split in pairs, one pair per row. In SQL Server, there are no such direct function exists, however there is a function Jul 26, 2016 · I am looking for a way to split a string in Oracle PL/SQL and get the last substring separated by the delimiter. This is the first time using this and a few of the functions I would usually use in the query editior to model the data don't work for direct query. By leveraging this function, we can simplify SQL data manipulation tasks and gain meaningful insights from even the most complex data strings. Mar 18, 2021 · I want a query that my output would be the string that comes BEFORE the id 678. Jul 23, 2025 · It creates a split_string function that splits a string into a list based on a given delimiter. Examples for efficient data handling on scaler Topics. split[-1]} into the database level. If index < 0, accesses elements from the last to the first. from pyspark. withColumn('last', split(col('employees'), ' ')) This tutorial shows you how to use the SQL Server STRING_SPLIT() function to split a string into a row of substrings based on a specified separator. To do this, you will first need to import the necessary libraries and create a PySpark dataframe with the desired column containing the strings. May 12, 2023 · 1 you can use string_split instead of substring but I wrote with two ways (substring without New Column,string_split ) Aug 30, 2018 · SQL to split a column by delimiter ‎ 08-30-2018 03:53 AM I'm building a report using direct query rather than import as I would like users to see real time data. Contiguous split strings in the source string, or the presence of a split string at the beginning or end of the source string, results in an empty string in the output. These names are lastname, firstname and I need it to change to FirstName LastName for the system I am pulling it into. For exampl Oct 16, 2018 · In one of the column i am getting 2 values with a delimiter between it How to extract both the values I have some thing like this Column TRN02 is 115679-5757 I need to take values before delimit Nov 21, 2014 · You can't generate a variable number of columns in BigQuery, only a constant number of columns, so you can't do exactly what you want. Jul 27, 2015 · Trying to negate the match string '[[:space:]]-[[:space:]]' by putting it in a character class with a circumflex (^) to negate it will not work. For example, if the config is enabled, the regexp that can match "\abc" is "^\abc$". Nov 21, 2013 · Hi,I have a string like 'abcd,def,hijk,lmno,pqrs' always separated by comma. Many RDBMS provides the functions or methods to split string on a delimiter and extract required text from an array. In other words, I want to push Ruby's sort_by {|x| x. May 10, 2018 · A better solution though would be to not split the string in SQL. Jan 29, 2025 · PostgreSQL SPLIT_PART() Function with Example : The PostgreSQL split_part function is used to split a given string based on delimiter and pick out the desire field from the string, start from left of the string. In T-SQL, you can use a combination of string functions to return the nth delimited element from a string. In this case, where each array only contains 2 items, it's very easy. Contains all the characters that should be considered as separators. There is a SQL config 'spark. I have a script I am working on to pull data from a SQL server. May 31, 2010 · What is the quickest way to retrieve the nth element in a delimited list, using Oracle 10g or above? If a table has a column containing the string 'cat,dog,mouse,rat,bat,car,door,lock', what is the quickest way to get, for example, the 4th element and return 'rat'. Optionally, you can retrieve a specific substring by specifying its index. In the first line malualves and in the second malualves123 I´ve used substring and charindex, but i dont know how to separate only that string. In this HANA SQL tutorial, I want to show how SQLScript programmers can use these two HANA functions with Concat () function for string split tasks required in many database developments. In this case, I have strings in a column with a consistent delimiter (comma in this example), but not all values are present. Is there some code that will help reverse the (fullnam) field and remove the Sep 11, 2020 · Splits a given string at a specified delimiter and returns the requested part. For an example, see Returning substrings for email, phone, and date strings. Use a positive integer to get items from the beginning of the string and a negative integer to get items from the end. Aug 12, 2022 · I am not a SQL person by any means. Jul 7, 2014 · I have to split a string with pipes as delimiter. The first is the name of the field—in this case, drugs_in_receipt. To return all characters after a specified character, you can use the POSITION and SUBSTR functions. functions import split, col, size #create new column that contains only last item from employees column df_new = df. please help me. This table-valued function splits a string into substrings based on a character delimiter. Nov 9, 2023 · Given someone's full name, I'm trying to use STRING_SPLIT to get the firstname and lastname. split(4:3-2:3-5:4-6:4-5:2,'-') I know it can get by split(4:3-2:3-5:4-6:4-5:2,'-')[4] But i want another way when i don't know the length of the Array . Hi TomI need to split a string dynamically into 4 parts each of maximum 22 characters but if 22nd character is not the right break (space) it should consider the last space. If their is no delimiter found, the last element is empty. escapedStringLiterals' that can be used to fallback to the Spark 1. Apr 1, 2024 · This is a formal description on how to split a string within a PySpark column and extract the last item from the resulting list. 1-03 The task is to get the second to last element of the array if you would split that using the "-" character. May 4, 2016 · The key column is the name of the specified property, or the zero-based index position of the element in the array… something that is missing from the STRING_SPLIT function. You can also get the second part from last, for example: Dec 1, 2023 · The split (col ("log"), ";") divides the log string into an array, and getItem extracts elements (0 for date, 1 for action, 2 for status). Sep 3, 2020 · Hello Everyone, I have a scenario where i need to divide a string from one column to two different columns in sql server. my_string = ABLMNC_154342_O_UW_UA-UCOU_SMC The problem i am facing i Jan 17, 2016 · I am working on SQL Server 2008 to create a stored procedure that: takes a string variable like this: '1,2,3' splits the string using a table-valued function to get each value separately and then i Aug 12, 2024 · The split() function takes a string and splits it into substrings based on a specified delimiter, returning the substrings in an array. Dec 3, 2018 · This blog post are going to cover the STRING_SPLIT function in SQL Server including an overview and detailed usage examples. You can use similar syntax with the split_part () function in PostgreSQL to get the last word from a string column in your own table. The exact function depends on which database you're using. From Microsoft, STRING_SPLIT is used like this: Jul 17, 2012 · This is based around the same code as the very fast string splitter function and will return the Nth item from a delimited list supplied as a single string ie the 4th item from 'this, is , a ,comma, delimited, string' would be ' comma ' Mar 16, 2023 · 10920 people are viewing posts with topic sql split string by delimiter and get second element. It's SQL Server 2008 (non-R2). Since SQL Server 2016, the easiest way to split is with the built-in function STRING_SPLIT(). Read and follow these steps carefully to SQL delimiter split successfully on your SQL server. MySQL how to split string by spaces If you want to split columns by spaces then you have similar way to do it. partnumber : Requested part of the split (index is 1 based). Oct 10, 2023 · Learn the syntax of the element\\_at function of the SQL language in Databricks SQL and Databricks Runtime. Note: the splitter is the character ';' and values a Jan 5, 2024 · PostgreSQL’s SPLIT_PART function offers a streamlined and straightforward method for string manipulation and parsing. Dec 30, 2024 · Learn how to parse or split SQL Server strings from one column into multiple columns using the parsename and other T-SQL functions. The substrings can have different length! For example: abcde@xyz abc@vwxyz How to output this column as two, or if it is easier Jun 15, 2021 · How to split string with delimiter and get the first value Asked 4 years, 5 months ago Modified 4 years, 5 months ago Viewed 15k times Learn how to split a string by delimiter in Oracle SQL with this easy-to-follow guide. Apr 8, 2024 · FROM table_name; string: The original string that needs to be split. So, in this article, you can learn a few methods to SQL split string by delimiter, which are easy to understand. Oct 15, 2018 · You can use this approach for more complex situation and split strings by different separators. The type column Jul 23, 2025 · In this article, we will explore various approaches to splitting delimited strings in PL/SQL and accessing their items. Jul 30, 2009 · For example, to match "\abc", a regular expression for regexp can be "^\abc$". Syntax Split (string, separator, limit, compare). Search SSC for 'split function. The second argument is the delimiter (a comma), and the third is the position of the desired element. Text to be splitted into individual strings. functions. Nov 7, 2016 · 49 For Spark 2. Oct 15, 2020 · 4 If instead of split_part(), you use split() and element_at() functions of AWS Athena combined together, you would get the desired result. This is a variation on the string-splitting examples herein. Jun 19, 2008 · INSTR and MID are not T-SQL functions so that won't work. Nov 12, 2014 · 52 I have a string and I would like to split that string by delimiter at a certain position. For example Mr John Doe, this should return John to be able to assign to a variable. There is no current way to split () a value in BigQuery to generate multiple rows from a string, but you could use a regular expression to look for the commas and find the first value. Like the OP, I'm trying to transform a single column into two columns. For a data migration project, I am converting JSON audit records stored in a SQL Server database into a structured report using SQL script. Arguments string A string column, expression, or string literal to be split. Mar 13, 2019 · I want to take a column and split a string using a character. Jun 27, 2002 · The Parameter for the function which you have to pass is, the Delimited String, the Delimiter of the string, nth Position of the string. Jul 18, 2013 · how could one split a string in PL/SQL to get the last value if the pattern look like this? : '1;2', in this case the value i want would be 2. Jun 16, 2022 · Hello/Hi/Howdy Using SQL, specifically Presto. position Position of the portion of string to return (counting from 1). Nov 2, 2023 · As a developer, few things are more ubiquitous than the need to split strings. You can use Jeff Moden's DelimitedSplit8K that will return the item and the item index: The trick is to reverse the string (REVERSE) before splitting with STRING_SPLIT, get the first value from the end (TOP 1 value) and then the result needs to be reversed again (REVERSE) to restore the original chars sequence. Learn how to effectively use the SPLIT STRING function in SQL Server to manipulate and extract data from strings. for e. A string like this for example: 'THIS|IS|AN|EXAMPLE' If I do something like this: SELECT REGEXP_SUBSTR('THIS|IS|AN|EXAMPLE', '[^|]+', 1, 4) FROM DUAL I should obtain the word EXAMPLE But if the string is like this: 'THIS|IS||AN|EXAMPLE' With the above query I still get EXAMPLE, but the word should be in the next position (5) because after IS Mar 15, 2005 · This simple table-valued function, when combined with an APPLY operator, allows you to identify nth position strings within a string that has separators. Oct 14, 2021 · Hi TeamI have a data snowflake table column as belowtblEmpEMPKey Name121RAW231A Raw122STEVE232B SteveI want to fetch only below bold value from column which is after bars122STEVE232BSo the output i will get 231A for first row and 232B for second rowIt is something like split string Categories: String & binary functions (General) SPLIT Splits a given string with a given separator and returns the result in an array of strings. So this would be the result using the above mentioned data: Dec 3, 2018 · This blog post are going to cover the STRING_SPLIT function in SQL Server including an overview and detailed usage examples. Whether you are parsing log files, extracting parts of a URL, splitting names into first/last, or analyzing text-based data, having the ability to split strings with precision is invaluable. If (" ") is used as separator, the string is split between words. in this eg i need to get Jan 31, 2023 · Several SQL programmers want to delimit string split in SQL server. Jan 19, 2018 · Read this tip to learn how to use the new SQL Server functions string_agg and string_split. Jan 26, 2017 · I want to get the last element from the Array that return from Spark SQL split () function. The string can be CHAR or VARCHAR. g declare @string varchar (100) = 'abcd,efg,hij,klmn,opqrstu,vwxyz' so now i want query which give me a result Nov 2, 2015 · Using SQL Server, how do I split a string so I can access item x? Take a string "Hello John Smith". So how does one get the first-position "First name" the second "Last Name" ? Using Cross-Apply transformed my ds into multiple rows. The string contains multiple substrings separated by commas(','). Jul 22, 2025 · Explore various SQL Server functions and methods for efficiently splitting strings by delimiters, with practical code examples. parser. , using XML or a numbers/tally table) and FOR XML PATH for re-aggregation. Mar 29, 2020 · However if you need a solution for Spark versions < 2. How to Split a String Based on Delimiter in PL/SQL? When working with delimited strings in PL/SQL, developers often need to split the string to access individual items. Syntax Dec 12, 2024 · Learn the syntax of the split\\_part function of the SQL language in Databricks SQL and Databricks Runtime. In this function , you can dynamically change the Delimiter Sep 16, 2024 · This tutorial explains how to get the Nth element from the string_to_array function in PostgreSQL, including an example. Apr 25, 2013 · String functions in SQL Server return the same type as their operands. 4, you can utilise the reverse string functionality and take the first element, reverse it back and turn into an Integer, f. For example, my String is F/P/O and the result I am looking for is: Therefore, I would like to separate the string by the furthest delimiter. Outputs List Type: RecordList of Text. Jan 30, 2023 · I am trying to use string_split() function in databricks to convert below dataframe. 6 days ago · Transact-SQL reference for the STRING_SPLIT function. split () function on the column and specify the delimiter to split the strings into a list. Dec 17, 2018 · Is it possiible to split a comma separated string in Hana into rows without using a user defined function. I would like the values to be split into separate columns, which is why I have not tried to employ Feb 29, 2024 · Let's explore PostgreSQL split string and how to split string in SQL. Then run a similar query to find the 2nd value, and Nov 18, 2022 · The split string is one of the common requirements in many relational database and programming languages. Goal is to deliver a sql script and a sql function used by the script without any code. Definition and Usage The Split () function splits a string into an array of strings. Does that work for all instances? Sep 2, 2021 · Aaron Bertrand (@AaronBertrand) of SQL Sentry explores some common approaches people use to split strings, complete with performance analysis. This function is then registered with the SQLite connection using create_function. In our example, we want the first element of the list, so we pass in 1 as the third argument. The regex string should be a Java regular expression. This article is all about learning how to do just that—take a long string of text and break it into pieces we can easily work with. You’ll need a custom split function (e. Read this tutorial and learn everything about Postgres split string and spring operations. Sep 13, 2019 · Imagine you have a string data column with some separator string. Feb 13, 2024 · How to use the PostgreSQL SPLIT_PART() function to split a string based on a specified delimiter and return the nth substring. The pattern, I'm assuming from this single instance, is that you split this string by a comma, trim each element, and return the 3rd element. example :'1100 Crescent PkWay Apartment 101 suite 200'22 characters would be '1100 Crescent PkWay Ap' then I need i Jan 29, 2024 · Unlock SQL's data parsing prowess with the SPLIT function. Problem You have a string in one of your SQL database fields and you want to split it into separate parts based on a specific delimiter or character. The split() method does not change the original string. List of strings that results from splitting the original Text. The strings are of different length. Mandatory. I have T-SQL code and am researching how to split Aruba\abc Spain\defg New Zealand\qwerty Antartica\sporty Such that the column outputs abc defg qwerty sporty So far, I found something like thi Jul 23, 2025 · In SQL, sometimes we get data that's all squished together, like a bunch of words separated by commas or other symbols. Oct 25, 2020 · I'd like to split the result from a query and display the values in separate columns. Jan 25, 2016 · I want to extract the substrings from a string in MySQL. As an example I get the following result Here, split_part() works in the following steps: Split the string 'ab,cd,ef,gh' using the delimiter ',', the result is an array {ab, cd, ef, gh}. Delimiters Type: Text. delimiter The delimiter string indicating sections of the input string. Basically split my data at the comma into individual rows? I am aware that storing a comma-separated string into a relational database sounds dumb, but the normal use case in the consumer application makes that really helpful. Whether working with CSV files, log data, or any form of delimited data, SPLIT_PART is invaluable for extracting requested substrings. 6 behavior regarding string literal parsing. 4+, use pyspark. Aug 25, 2025 · Older versions of SQL Server: If you’re stuck on 2014 or earlier, STRING_SPLIT() and STRING_AGG() aren’t available. It is a useful function for parsing and extracting specific segments of a string. Nov 28, 2024 · An easy way to split strings in SQL Server is by using the STRING_SPLIT function. In this examples we can see how to split sentences into separator SQL columns from SQL query. split() is the right approach here - you simply need to flatten the nested ArrayType column into multiple top-level columns. But sometimes, programmers may get confused as to how you can do it. Feb 13, 2012 · 2 I know this question is specific to sql server, but I'm using postgresql and came across this question, so for anybody else in a similar situation, there is the split_part(string text, delimiter text, field int) function. Includes examples and code snippets. Visit to see details now Dec 12, 2024 · Learn the syntax of the split function of the SQL language in Databricks SQL and Databricks Runtime. As per usual, I understood that the method split would return a list, but when coding I found that the returning object had only the me Jun 1, 2020 · In this article we look at how to use the STRING_SPLIT function and replace older implementations of string split functions. Here's an example using the STRING_SPLIT function (available in SQL Server 2016 and later versions): BigQuery can now SPLIT ()! Look at "find all two word phrases that appear in more than one row in a dataset". Something like this from oracle : Mar 29, 2018 · The PostgreSQL split_part function takes three arguments. I don't want to do the split in the application as I need paging, so I wanted to explore options before refactoring the whole app. This article covers PowerShell scripts to split a string into an array using . One option here is to make use of SQL Server's base string functions SUBSTRING() and CHARINDEX() to split apart the two parts of Field1 on the pipe character. bjqy fzjwh porig uxfgxmon dopd ytpl dtxcijq dmdzb qhbw dccxs dklx rrsld bztw gops anywbhl