doubt in db2

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
supriya
Member
Posts: 7
Joined: Wed Sep 27, 2006 12:19 pm

doubt in db2

Post by supriya » Wed Sep 27, 2006 12:56 pm

hi,
pls help me.
1)How to display * using select query?
* *
* * *

User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

sql query

Post by Krishna » Wed Sep 27, 2006 3:32 pm

Code: Select all

Select '*' from SYSIBM.SYSDUMMY1

or

Select CHAR('*')  from SYSIBM.SYSDUMMY1


Thanks,
Krishna

ovreddy
Member
Posts: 14
Joined: Sat Oct 07, 2006 4:13 pm
Location: Chennai
Contact:

Post by ovreddy » Sat Oct 07, 2006 4:26 pm

Hi Supriya,

Please refer to the following syntax to get the result.

SELECT '*' FROM SYSIBM.SYSDUMMY1
UNION
SELECT '**' FROM SYSIBM.SYSDUMMY1
UNION
SELECT '***' FROM SYSIBM.SYSDUMMY1;
---------+---------+---------+---------+---------+---------+---------+---------+

---------+---------+---------+---------+---------+---------+---------+---------+
*
**
***
DSNE610I NUMBER OF ROWS DISPLAYED IS 3

Hope you got what you want.

Thanks,
Reddy.

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