Question: I ' m trying to get only the ending number of the store limit . I did this, but I ' m still getting additional
Im trying to get only the ending number of the store limit I did this, but Im still getting additional characters I don't want to include. How can I exclude them?
DROP TABLE #Store
CREATE TABLE #Store
Description varchar
;
INSERT INTO #Store Description
VALUES Store Pricing Plan # modified. Store Limit changed from NULL to
Store Pricing Plan # modified. Store Limit changed from NULL to Sotred Pricing Program changed from NULL to Sale Pro Plan'
Store Pricing Plan # modified. Store Price changed from to Store Limit changed from to asdfghj Plan Name'
Store Pricing Plan # modified. Store Limit changed from to
Store Pricing Plan # modified. Store Limit changed from to Money Limit changed from to
Store Pricing Plan # added. Store Price: date from to
SELECT
#Store.Description
CASE WHEN
CHARINDEXStore Limit changed from #Store.description AND CHARINDEXto #Store.Description CHARINDEXStore Limit changed from #Store.Description THEN
LEFTSUBSTRING#Store.Description CHARINDEXto #Store.Description CHARINDEXStore Limit changed from #Store.Description CHARINDEX #Store.Description CHARINDEXto #Store.Description CHARINDEXStore Limit changed from #Store.Description CHARINDEXto #Store.Description CHARINDEXStore Limit changed from #Store.Description
ELSE NULL
END 'Store Limit'
FROM #Store
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
