Write a query to retrive partial string.
Answers were Sorted based on User's Feedback
Answer / rajesh_m13
substr('string',1,3) which gives str. correct me if i am wrong
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / 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 |
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
What is a LIKE table and how is it created?
What is query for your birthday date should be in hours,minute and seconds format?
SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.
Mention and explain the contention situations caused by locks?
How would you move a tablespace (using STOGROUP) to a different DASD volume allocated to that tablespace?
Why select is not preferred in embedded sql programs?
When do you specify the isolation level? How?
What is plan in cobol db2?
Bind concepts in DB2 cobol
10 Answers IBM, TCS, TRD, Virtusa,
Name the lockable units in DB2?
How can we define a table? How can we apply SEARCH ALL on it ?