I have the following C# linqToDb query:
var instruments = (from res in _db.Instrument.Instruments.WithNoLock()
where Sql.Like(ticker, res.Value.Substring(0, 3))
select new
... etc ...
This clearly will do a comparison of ticker to the first 3 characters of res.Value. But instead I want to do the comparison to res.Value up to the first empty space, excluding that empty space. So for instance
"VVR" and "VVR UT" would match.
I have made various attempts but have failed. How can this be done?
This is a trivial programming exercise.
Alternative - definitely less efficient as it DEFINITLY makes another string:
Not a specialist here - if I have to write a regex, I have an AI write it and the test cases.
If your problem is #1, you definitely should do some basic string manipulation exercises.