in column y record
abc.v
abc.s
xyz.j
abc.h
i wan only abc columns
how to retrieve thi records

Answers were Sorted based on User's Feedback



in column y record abc.v abc.s xyz.j abc.h i wan only a..

Answer / madhu t

select Y from <table> where substr(y,1,3) = 'abc'

we can achieve this by using substring function in sql.
SUBSTR(column-name,starting-position,length)

Is This Answer Correct ?    12 Yes 0 No

in column y record abc.v abc.s xyz.j abc.h i wan only a..

Answer / ekalavya

SELECT Y
FROM TABLEA
WHERE Y LIKE 'abc%';

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More DB2 Interview Questions

What is the reason behind not using select * in embedded sql programs?

0 Answers  


What is dclgen (declaration generator)?

0 Answers  


Is it possible to precompile if db2 goes down?

4 Answers   Target,


How does the processing of a correlated subquery differ from a non correlated subquery?

1 Answers  


How do I import data from excel to db2?

0 Answers  






Q4. How will you get the count of record without using COUNT verb in query?

2 Answers   IBM,


when we are tying to update a table having 100 rows. if the program abends when updating 51 row . how to start updating again from the 51 row .what was the logic

2 Answers   TCS,


What is db2 command?

0 Answers  


What is explain in db2?

0 Answers  


what is the difference between declaring the cursor in WS section and Procedure division?

1 Answers   HCL,


what's the equivalent Cobol Data type for Decimal(x,y) in DB2? what does the current SQLID register contain?

3 Answers   Cap Gemini, Tech Mahindra,


Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?

1 Answers   UST,


Categories