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
 
Simple SELECT or CURSOR

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

New User


Joined: 29 Aug 2005
Posts: 35

PostPosted: Tue Sep 13, 2005 7:28 pm    Post subject: Simple SELECT or CURSOR
Reply with quote

?How can one determine before performing a task that either a cursor is required or simple select statement ?
Back to top
View user's profile Send private message

baru

New User


Joined: 08 Sep 2005
Posts: 4
Location: Mumbai

PostPosted: Tue Sep 13, 2005 9:06 pm    Post subject: Simple SELECT or CURSOR
Reply with quote

It depends upon your requirement. If the SQL Query retrieves only one row you can use simple select and for multiple rows you can use cursor.
Back to top
View user's profile Send private message
withnams

New User


Joined: 06 Jul 2005
Posts: 26
Location: Chennai

PostPosted: Thu Sep 15, 2005 1:57 pm    Post subject:
Reply with quote

If the WHERE clause refers to a column that is unique you can avoid cursor. But as baru said it all depends on your requirement.
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 -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am

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