Write a query to retrive partial string.

Answer Posted / ignatius pradeep

A Sample Query:

SELECT SUBSTR(DESC_T,1,4)
FROM PRODUCT
WHERE PROD_I = 123456;

DESC_T is a column in the table PRODUCT

The first four characters of the DESC_T will be displayed.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create db2 table in mainframe?

736


How do I optimize a query in db2?

710


Explain about rct.

744


What are packages in db2?

687


How can you do the explain of a dynamic sql statement?

719






How to compare data between two tables in db2?

747


How do you simulate the explain of an embedded sql statement in spufi/qmf?

724


What is meant by union and union all?

668


Following a db2 update statement, what is the quickest way to compute the total number of updated rows?

711


What db2 400?

795


What is null in db2?

652


Comment whether dclgen is mandatorily used. If not, then what is the point of using it?

705


SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected

11170


Is db2 a programming language?

692


is it compulsory commitment control in journal?

2087