-
Extracting text from String?
Declare @Str As varchar(500)
Declare @Name As varchar(500)
Declare @Address As varchar(500)
Set @str ='DABLennon,JohnDAQ1466 N Beatles AveDAL'
Select @str = SUBSTRING(@str,CHARINDEX('DA',@str)+3,LEN(@str))
Select @Name = SUBSTRING(@str,1, CHARINDEX('DA',@str)-1)
Select @Name AS FULL_NAME
Select @str = SUBSTRING(@str,CHARINDEX('DA',@str)+3,LEN(@str))
Select @Address = SUBSTRING(@str,1, CHARINDEX('DA',@str)-1)
Select @Address As Address
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|