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
 

 

searching row from db2 table

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

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Fri Aug 19, 2005 7:08 pm    Post subject: searching row from db2 table
Reply with quote

Dear Friends

Quote:
There is one db2 table.I have to perofrm search operation on various conditon on same table.
How could i do it? can it be possible by declaring ine cursor.


Thanks and regards
Chandra
Back to top
View user's profile Send private message

learnmf

Active User


Joined: 14 Mar 2005
Posts: 123

PostPosted: Fri Aug 19, 2005 7:14 pm    Post subject: Re: searching row from db2 table
Reply with quote

I want to make you more clear about the structure


Quote:
It is like this:-------

Suppose the TAB is a DB2 table.

If Cond-1 is true and val-1='c' and
there is no row having condintiion tab.colA='abc' and tab.colb='asd'
then display message-1
And no row found having condition tab.colA='abc' and tab.colc='jkl'
then display msg-2


Thanks And Reagards
Chandra
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Sat Aug 20, 2005 11:08 am    Post subject:
Reply with quote

I must say that your question is not very clear. From what I understood you could just use 2 queries for the 2 cases, there is no need of a cursor.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


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