anandrao akaram hake


{ City } mumbai
< Country > india
* Profession * associate consultant
User No # 35134
Total Questions Posted # 0
Total Answers Posted # 5

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 22
Users Marked my Answers as Wrong # 5
Questions / { anandrao akaram hake }
Questions Answers Category Views Company eMail




Answers / { anandrao akaram hake }

Question { Cap Gemini, 23382 }

How to resolve -502 sql code in DB2?


Answer

This error occures when you are opening the cursor which is
already open in current session.

Is This Answer Correct ?    10 Yes 1 No

Question { Cap Gemini, 27844 }

How to resolve -407 sql code in DB2?


Answer

This error occures when you are assigning NULL value to NOT
NULL column.
You can wrap the variable with coalesce/value and default
it but it is totally dependant on business logic.

Is This Answer Correct ?    8 Yes 2 No


Question { Cap Gemini, 17462 }

How to resolve -504 sql code in DB2?


Answer

There are following possibilities to this issue to come,
1) Cursor is not declared in application program or
in stored procedure depending on where it is used.
Soln - Declare the cursor in application
program or in stored procedure depending on where it is
used.
2) Cursor spelling is not correct which you are
going to open or fetch.
Soln - Check the name used and correct.

Is This Answer Correct ?    3 Yes 0 No

Question { 6434 }

What is the purpose of coding FETCH in a SQL SELECT query?
Explain with an example in Detail?


Answer

FETCH will give only the number of rows equal to the number
specified with FETCH from resultset given by query.
e.g. consider ACCOUNT_MASTER table contains 100 rows.
SELECT *
FROM ACCOUNT_MASTER
FETCH FIRST 10 ROWS ONLY.
Will give only first 10 rows of ACCOUNT_MASTER table from
100 rows of ACCOUNT_MASTER table

Is This Answer Correct ?    1 Yes 0 No

Question { Wipro, 9266 }

if suppose i am having an ACCOUNT table with 3 coloumns ACC.
NO,ACC. NAME,ACC. AMOUNT . If a unique index is also
defined on ACC.NO and ACC.NAME then write a query to
retrieve account holders records who have more than 1 ACC.


Answer

please try this solution also

select count(*),ACC.NO
FROM ACCOUNT
group by ACC.NO
HAVING COUNT(*) > 1

Is This Answer Correct ?    0 Yes 2 No