Hi
I have string variable . I want to get characters from 3 position left side.
Thanks
Hi
I have string variable . I want to get characters from 3 position left side.
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Jignesh KumarRank #91 · 22.9K reputationPosted Dec 16, 2024, 5:02 AM EST
You can use Left function to achieve that,
Left({YourStringField}, 3)Rajeesh MenothRank #118 · 18.4K reputationPosted Dec 16, 2024, 6:36 AM EST
You can use SUBSTRING(your_column, start_position, length) is used to extract a substring from your_column.
SELECT SUBSTRING(your_column, 7 - 3, 3) AS left_chars, -- 3 characters to the left SUBSTRING(your_column, 7 + 1, 3) AS right_chars -- 3 characters to the right FROM your_table_name;Jignesh KumarRank #91 · 22.9K reputationPosted Dec 16, 2024, 12:30 PM EST
Hello Ramco,
As Rajeesh said you can do from SQL query or in crystal report for substring you can use Mid function,
Mid({YourStringField}, 3, 3)Ramco RamcoRank #462 · 5.4K reputationPosted Dec 16, 2024, 6:21 AM EST
Hi Jignesh
I want to extract from 3 position to next 3.
Thanks