user222427
user222427

Reputation:

SQL select based on pipe split

I have a column called Data1 the column contains the following data "Apples|Farmer|11"

How do I select "Farmer" from Data1 in a select

select data1 from tblMyTable

Upvotes: 0

Views: 295

Answers (1)

Jauzsika
Jauzsika

Reputation: 3251

SELECT SUBSTRING_INDEX('Apples|Farmer|11', '|', 2)

Upvotes: 5

Related Questions