SINGLE ROW

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
User avatar
ibmlearner
Member
Posts: 13
Joined: Sat Dec 02, 2006 5:57 pm

SINGLE ROW

Post by ibmlearner » Thu Mar 08, 2007 7:48 pm

HI ALL !!!!!!!


HOW DO I KNOW THAT IM SELECTING A SINGLE ROW ????

WE CAN SAY WHEN WHERE CLAUSE IN SELECT STATEMENT.

APART FROM THAT ANY ANSWER PLZ ???

TIA.
Thanks & Regards
-------------------------
Learner

Veera
Moderator
Posts: 111
Joined: Wed Feb 22, 2006 2:59 pm

Post by Veera » Fri Mar 09, 2007 11:14 pm

There are few SQL internal fields whcih are part of SQLCA area..if we look at the
internal strucutre of the SQLCA will know the info reg the variable it has as part
of its strucutre.

SQLERRD(3)
For INSERT, UPDATE, REFRESH, and DELETE, shows the number of rows affected.
For a FETCH statement, SQLERRD(3) contains the number of rows fetched.

Get some info on SQLCA area you will find more info on this.

Thanks,
Veera

User avatar
Sheela
Member
Posts: 14
Joined: Mon Feb 26, 2007 8:17 am
Location: Chennai

DB2 - SQL INSERT DELETE UPDATE

Post by Sheela » Sat Mar 10, 2007 7:06 am

Apart from what veera said,

for singleton select statements,
if SQLCODE=0 means query selected one record
if SQLCODE=-811 means query selected multiple records.
Regards,
Sheela

academyindia4

Topic deleted by Admin

Post by academyindia4 » Fri Jan 15, 2016 10:00 pm

<< Content deleted By Admin >>

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