Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hello SQLTEAM community. I am very new to SQL and have a question on a query.
SELECT column1, column 2, column3 FROM table1WHERE column1 = "string"
This returns all the rows where column1 contains "string". Here is my question: In column 3, the data contains multiple lines such as:
Serial#: DSG5STFER24RAM: $GBHDD: 500GB
How can I parse column3 to just pull a specific line (i.e. Serial:#xxxxxxxxxx)?
bitsmed
Aged Yak Warrior
545 Posts
Posted - 2015-02-09 : 18:59:09
[code]select column1 ,[column 2] ,column3 from table1 where column1='string' and column3 like '%Serial:#xxxxxxxxxx%'[/code]Edit: tags/formating corrected