View previous topic :: View next topic
|
Author |
Message |
chidu13
New User
Joined: 07 Nov 2008 Posts: 2 Location: US
|
|
|
|
Hi,
I needed to pick rows from a column(field) in DB2 table depending on some characters in that column.
For ex if the field length is from 1 to 10 positions , i need to pick all the rows in that column which has 9th and 10th column ='US'.
Please can anyone help me how to do search for a string?
Thanks,
chidu |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Chidu,
This will do for you
SUBSTR(A.FieldName,9,2) = 'US' |
|
Back to top |
|
|
chidu13
New User
Joined: 07 Nov 2008 Posts: 2 Location: US
|
|
|
|
Yes this does work .. thankyou |
|
Back to top |
|
|
anandinmainframe
Active User
Joined: 31 May 2007 Posts: 171 Location: India
|
|
|
|
Chidu,
You are welcome. |
|
Back to top |
|
|
|