sql server - how to split values in SQL -
sql server - how to split values in SQL -
i writting sql script first time , want seperate value contains 2 user id's looks
612831408762037_617540318291146 i want separate these 2 have user_id = 612831408762037 , post_id = 617540318291146 ideas on how shuld approch this?
thanks in advance
please try:
declare @var nvarchar(100)='612831408762037_617540318291146'; select left(@var, charindex('_',@var)-1), right(@var, charindex('_',reverse(@var))-1) sql sql-server
Comments
Post a Comment