Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Justify to pick up all records which start with SL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Thu Sep 11, 2008 11:22 pm    Post subject: Justify to pick up all records which start with SL
Reply with quote

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
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Sep 11, 2008 11:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Thu Sep 11, 2008 11:44 pm    Post subject: Reply to: Justify
Reply with quote

I used LTRIM to get that done.
Thanks.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Sep 12, 2008 11:39 am    Post subject: Reply to: Justify to pick up all records which start with SL
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts How to Clear all TSQs during CICS sta... Hooman24 CICS 10 Mon Jun 26, 2017 9:46 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us