Check on low values in table

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
aravindan333
Member
Posts: 10
Joined: Wed Dec 07, 2011 11:42 am

Check on low values in table

Post by aravindan333 » Wed Oct 08, 2014 5:41 pm

I have a varchar column which contains low values, how can i filter those varchar columns which contains low values ? Any ideas ? :roll:

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Thu Oct 09, 2014 7:31 pm

what do you mean by 'filter'?

there are lots of things that can be done.
show us an example, with an explanation of your expectations,
and I am sure, answers will come.

as it is, your question is too vague for anyone to waste time answering.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

aravindan333
Member
Posts: 10
Joined: Wed Dec 07, 2011 11:42 am

Post by aravindan333 » Fri Oct 10, 2014 10:53 am

My apologies for such a vague question, let me explain with scenario.

I have a table called 'FACEBOOK' with columns
FB name, FB status

FB Name - Profile name of FB user
FB status - Status of FB user.

So FB Name is declared as char and FB status is declared as Varchar.

The problem is some of status contains low values in BETWEEN as like below.

Text - HAD A GREAT DAY TODAY !!!!
Hex -CCC4C4CDCCE4CCE00000EDCCE45555
81401079513041800000364180AAAA

I need to come up with a SQL query to fetch those FB names with FB status containing low values.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Oct 13, 2014 6:43 pm

probably resource intensive but I imagine you will not be running this regularly (because the input program should be corrected),
the CONTAINS Function will provide you with what you need.

there are examples at the bottom of the page in the manual.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others