Question for everyone... I have some values I've inserted into a table as I try to play around with string functions. What I'm trying to do is remove the end of the string and keep everything before it:
CREATE TABLE #BrokerNameT
(
BrokerName VARCHAR(100)
)
INSERT INTO #BrokerNameT
(BrokerName)
VALUES ('Peter Pan Co Cash'),
('Batman Co Cash'),
('Spiderman Algo'),
('Spiderman Cash')
Here what I'm looking to is simply return: 'Peter Pan Co', 'Batman Co', and 'Spiderman'
Is it possible to search for the first space from the end of a string? If i was able to do that, couldn't I just then keep everything before the first space?
Any idea how I'd go about doing this?
Could I use two reverses to achieve this?