View previous topic :: View next topic
|
Author |
Message |
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
Hi,
In the database
I have got values as
1. 'bbbbbSLTT'
2. 'bbSLATbbb'
where b is the blank.
I want to pick up all records which start with SL. How do I handle that ?
Please note that it we dont know from where the SL starts.
Please advise. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If the value starts with a blank then it doesn't start with "SL".
Code: |
You could use WHERE POSSTR(FIELD, ' SL') <> 0 to find BlankSL or WHERE posstr(field, 'SL') <> 0 just to find a row that contains SL. |
|
|
Back to top |
|
|
ap_mainframes
Active User
Joined: 29 Dec 2005 Posts: 181 Location: Canada
|
|
|
|
I used LTRIM to get that done.
Thanks. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Quote: |
I used LTRIM to get that done. |
Good. Could you please post the complete SQL that you had used? This would benefit everyone. |
|
Back to top |
|
|
|