how to get index of in sql server? Ask Question
By   Adil Shahbaz     14-Jul-2024    1

I have an field with name email like ""

I want to get first text of @ which is "abcd" and set it into another field username.



You get this by using LEFT and CHARINDEX


SELECT LEFT(', CHARINDEX('@', '') - 1) AS username

Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM