TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Prasad Anumolu
NA
15
1.8k
Query to split string from comma
Feb 10 2016 3:15 AM
DECLARE @str varchar(50)='Hello, world'; /* SQL SERVER QUERY TO SPLIT STRING FROM COMMA AND GET LEFT AND RIGHT PART */
SELECT LEFT(@str, CHARINDEX(',', @str)-1) as LeftPart, RIGHT(@str, LEN(@str)-CHARINDEX(',', @str)) as RightPart;
Error is
Must declare the scalar variable "@str"
why it is coming ? if any one know tell me friends
Reply
Answers (
5
)
How a Non-clustered indexing is best and in which scenario?
How to restrict to anyone that he can't b modified db in sql