Is there a built in function (as opposed to a UDF) or can someone provide sample code to split a String to two columns when a character is encountered?
Sample:
1234:abcd
split the above string into 1234 and abcd into two columns
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Title/tag mismatch?
For Excel, if
A1contains the value:make
B1=LEFT(A1,IF(ISERROR(FIND(":",A1)),LEN(A1),FIND(":",A1)-1))make
C1=RIGHT(A1,IF(ISERROR(FIND(":",A1)),0,LEN(A1)-FIND(":",A1)))Or for T-SQL + a string variable;
for a select;