Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to find Low Values in DB2 Coloumn

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
SriRanjan
Currently Banned

New User


Joined: 05 Sep 2006
Posts: 3

PostPosted: Tue Oct 10, 2006 10:50 am    Post subject: how to find Low Values in DB2 Coloumn
Reply with quote

Hi All,

I have a column called 'Client_Name' with Char(50) in the DB2 table.
But this coloumn contains Low Values .So I want to find all the rows which contains Low Values in this column ... can u please help me out ???
Please find the attachment If u want example.
[/img]
Back to top
View user's profile Send private message

meetreks

New User


Joined: 28 Sep 2006
Posts: 26
Location: Edinburgh

PostPosted: Tue Oct 10, 2006 3:47 pm    Post subject:
Reply with quote

Just check Client_Name = X'0000', either in SPUFI or in the Host Program.

Hope this helps.
Back to top
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Tue Oct 10, 2006 4:23 pm    Post subject: how to find Low Values in DB2 Coloumn
Reply with quote

chk this out ...

SELECT Client_name FROM TABLE
WHERE LENGTH (Client_name) > LENGTH (REPLACE(Client_name, X?00?,'') ;
Back to top
View user's profile Send private message
SriRanjan
Currently Banned

New User


Joined: 05 Sep 2006
Posts: 3

PostPosted: Wed Oct 11, 2006 12:19 pm    Post subject:
Reply with quote

Thanks Guys for quick reply ...
tried both possible ways but Its not working.
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Wed Oct 11, 2006 5:17 pm    Post subject: Re: how to find Low Values in DB2 Coloumn
Reply with quote

Hi sri ranjan,

Try for this what meetreks mentioned. This is working for me.

Select client_name from table name
where cline_name = x'00'
Back to top
View user's profile Send private message
surya_pathaus

Active User


Joined: 28 Aug 2006
Posts: 110

PostPosted: Wed Oct 11, 2006 5:23 pm    Post subject: Re: how to find Low Values in DB2 Coloumn
Reply with quote

Hi sriranjan,

Sorry, my field is of x(1) that is why it was working.
If you give x'00' for x(50) time then your query will work.
I am not sure there is a shortcut.
Back to top
View user's profile Send private message
norm.flynn

New User


Joined: 08 Jan 2013
Posts: 20
Location: usa

PostPosted: Wed May 08, 2013 1:57 am    Post subject:
Reply with quote

Here is a method which will work for looking for low values

select client_name from table
where client_name like X'6C006C'

The 6C is the hex equivalent of the '%' sign, This will return any rows with low values anywhere in the column
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed May 08, 2013 2:40 am    Post subject: Reply to: how to find Low Values in DB2 Coloumn
Reply with quote

I doubt that after 7 ( seven ) years SriRanjan might still be interested in the answer icon_cool.gif
Back to top
View user's profile Send private message
norm.flynn

New User


Joined: 08 Jan 2013
Posts: 20
Location: usa

PostPosted: Wed May 08, 2013 2:46 am    Post subject: Re: Reply to: how to find Low Values in DB2 Coloumn
Reply with quote

had someone ask me about this, saw this post on the forum, so just wanted to post the solution to this issue as it is not well documented anywhere.
Back to top
View user's profile Send private message
feellikeneo

New User


Joined: 19 Mar 2007
Posts: 73
Location: Chennai

PostPosted: Mon Oct 31, 2016 11:43 pm    Post subject: Reply to: how to find Low Values in DB2 Coloumn
Reply with quote

And this solution did help me after 3 years icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us