Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [string-splitting]

Use for questions about spitting strings using a specified delimiter.

8
votes
2answers
121 views

Fastest way to split/store a long string for charindex function

I have a 1 TB string of digits. Given a 12-character sequence of digits I want to get the start-position of this sequence in the original string (charindex function). I have tested this with a 1GB ...
-1
votes
0answers
20 views

Splitting comma separated values into rows [duplicate]

SELECT A.substance, Split.A.value('.', 'VARCHAR(2000)') AS String FROM (SELECT substance, ID, CAST ('<M>' + REPLACE(substance, ',', '</M><M>') + '</M>' AS XML) ...
6
votes
1answer
183 views

How to split XML array into separate rows (while upholding consistency)

I am working on the database dump of this exact stack exchange section. While I am working on it I have encountered one issue that I am currently unable to solve. In the XML File Posts.xml the ...
0
votes
1answer
122 views

Index for split string. PostgreSQL 10

I have the following string in db: A/B/C/ A/B/D/ E/F/C/ It's the uri column. The table is the following: create table meta_info ( id bigserial primary key, uri varchar, created ...
0
votes
1answer
48 views

Database organization for mirroring / partitioning / multistore [closed]

I know that is kind of generic question, but there is not other way to find a good answer. I have a requirement to create a network of a server and few simple PCs. My boss wants to have the database ...
1
vote
0answers
437 views

MySQL: Loop on each column value & split column by delimiter & replace numbers with values from another column

I would like to loop on each value of path column & split content by '/' delimiter & replace numbers with values from another column using MySQL & store result into another new column ...
0
votes
1answer
941 views

MySQL: Split column by delimiter & replace numbers with values from another column

Using MySQL, split column by delimiter & replace numbers with values from another column. I have a column named 'path' having paths like '/426/427/428'. I would like to replace category numbers ...
0
votes
1answer
402 views

why my split string functions are not working with large OBJECT_DEFINITION?

I have in one of my databases a stored procedure called PROCEDURE [repl].[usp_upd_repl_out_application], that is not exactly a very clever stored procedure but it has over 389 lines. As I need to ...
0
votes
1answer
35 views

Problems splitting and aggregating data in SQL

Hello I have the following data in csv file: OrderID, OrderType, Amount, Price, Time 1, Buy, 10, 1, 10/01/2018 10:30 AM 2, Buy, 2, 1, 10/01/2018 11:30 AM ...
-2
votes
2answers
82 views

Error when using a query as a function parameter [closed]

I have followed this tutorial for creating a string splitting function. When I try to run the function from the article using a SELECT as the first parameter, I get the following error: select '...
1
vote
1answer
1k views

Split two delimited strings in same order without function

I am trying to split two columns with delimited strings into rows. The positions of the values in each string are related so I am trying to split it out so that the related values are in a row. I am ...
1
vote
1answer
30 views

Would db corruption be further minimized if I remove querying on a backend table from the user's front end?

I have an MS Access database that was being used by 30 people. They all use it at different times of the day, but within any 8 hour block of time there might be 10 people using it. This database was ...
1
vote
1answer
124 views

Querying an array of strings with a string that represents search terms

I have an array of values like: array ('hello world', 'foo', 'bar') -- terms here have only letters and one space at most and some text like: 'foo hello-world hello1world' and I would like to get ...
2
votes
3answers
753 views

SQL - Convert text to a list of numeric values [duplicate]

Looking for SQL code to transform the text string '12,13,14' to this list of numbers +----+ | 12 | +----+ | 13 | +----+ | 14 | +----+ Example: table0.params (varchar) field contains this text: 12,...
-4
votes
1answer
729 views

Split hyphenated nvarchar value [duplicate]

I have a table with 6 columns one of which is a NVARCHAR (65) datatype. All of the entries in this table have the format XXXXX-nnnnnn. I want to be able to use the '-' as a delimiter and construct a ...
0
votes
0answers
46 views

Split access database to online storage

I have an access program that has 4 tables. I want to split them to an online storage that I could use my app in many places with same database. I have an website that is Linux server and FTP account. ...
0
votes
2answers
48 views

MS SQL 2012 - Need to split records from 4 different fields then query those

So I have a table called 'WORK_ORDER' and the ID is a unique text example '16-0833' next would be 0834, 0835, etc. In that table there are 4 user fields.. USER_1, USER_2, USER_3, USER_4.. This top ...
3
votes
1answer
147 views

Split a row into two for attendance seet

I'm redesigning an attendance system used in my company. Originally, an attendance sheet was rendered on a Grid that was getting week-by-week data Pivoted. I've opted for a Scheduler control by ...
1
vote
1answer
2k views

Splitting a table into two tables randomly with 50-50 percent of records in impala

I have a table having n number of records in impala. I need to find out how can I divide that table into two equal halves with 50 - 50 percent of records in each.
1
vote
2answers
734 views

Split String Function

I have a question regarding this Split String function Aaron Bertrand recommends here. With it you can extract information between two slashes. Now if I want to extract not only one piece of info ...
1
vote
1answer
1k views

How to split a row based on a delimiter into multiple rows and retain the ID and ordering by using a single SQL statement for MySQL [duplicate]

Scenario: A MySQL table A Delimiter (e.g. comma) is used to separate entities inside a string store in a column of the MySQL table MySQL table contain 2 columns - ID and Countries_Involved ==========...
0
votes
2answers
5k views

Remove a character from a records enclosed between double quotes

I have a table in which every row have data like: 0150566115,"HEALTH 401K","IC,ON","ICON HEALTH 401K",,,1,08/21/2014 What I want is to remove every comma (,) that is enclosed between double quotes " ...
1
vote
1answer
973 views

Why MongoDB starts to split before 64MB

I'm testing the MongoDB Sharding with a Sharded Collection and a forloop to insert arround 1M documents to see how splitting and moving works. I'm surprise that after few documents MongoDB starts to ...
5
votes
1answer
25k views

Split/explode comma delimited string field into SQL query

I have field id_list='1234,23,56,576,1231,567,122,87876,57553,1216' and I want to use it to search IN this field: SELECT * FROM table1 WHERE id IN (id_list) id is integer id_list is varchar/text ...