Add RIGHT() and LEFT() string functions from SQL
_Spawned from #588_
+1
Presumably these functions only work on varchars and it throws an error if the length supplied is greater than the length of the returned value....
ie
create table myTable (id int, name varchar(10))
insert into myTable (id, name) values (1,'test')
select left(name,3) from myTable returns 'tes'
select right(name,3) from myTable returns 'est'
select left(name,5) throws error
select right(name,5) throws error
select left(name,0) throws error
select right(name,0) throws error
Most helpful comment
+1