I realise that it would be a lot easier if I could modify the table when it was created, but assuming I can't, I have a table that is such as:
abcd
abde
abdf
abff
bbsdf
bcggs
... snip large amount
zza
The values in the table are not fixed length. I have a string to match such as abffagpokejfkjs . If it was the other way round, I could do
SELECT * from table where value like 'abff%'
but I need to select the value that matches the start of a string that is provided.
Is there a quick way of doing that, or does it need an itteration through the table to find a match?
LEFT(value, 4)or aLIKE?