Need specific string in SQL Server -


i need guys.

i trying specific word whole string in sql server.

i have following string:

'abc, xyz'

need output : abc

now need abc out of whole string. tried substring , trim function couldn't appropriate output.

could anyonel please me?

thank in advance!

try use patindex example

select substring ('abc, xyz',1, patindex ( '%,%', 'abc, xyz')-1) 

Comments

Popular posts from this blog

python - jinja2: TemplateSyntaxError: expected token ',', got 'string' -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -