Guys:
I run a query and get a field with 13 characters lenght. Is there any way to get or truncate the lenght of the field in the same scripts??. I need just 10 characters starting from the third one.
ThanksUse the right string function.|||How I can use the right string function??
How I can indicate the lenght and from what position to truncate??
Regards|||Do all the fields have a length of 13 ? Do you always want the 10 characters, starting with the 3rd character - no matter what the length is ?|||Yes, always 13 positions and always I will need 10 positions after third.
Regards,|||select right(fieldname, 10) from ...
Since you know the field is always 13 characters grabbing 10 characters will always start from the 3rd position:
e.g. fieldname = 'abcdefghijklm'
right(fieldname,10) = 'defghijklm'|||I will try it.
Thanks
No comments:
Post a Comment