Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

In db2, how do you insert multiple rows in 1 query using a.)
Cursors, b.) Normal query?? Give syntax for both.

Answer Posted / adi

MOVE +100 TO HV-NUM-ROWS.
INSERT INTO EMP
(EMPNO, LASTNAME, FIRSTNME,
MIDINIT, SALARY, BONUS)
VALUES (:HV-EMPNO-ARRAY,
:HV-LASTNAME-ARRAY,
:HV-SALARY-ARRAY,
:HV-BONUS-ARRAY)
FOR :HV-NUM-ROWS
ATOMIC

all array elements will have a 100 occur clause

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is dbrm? What it contains?

1216


What is db2 bind process?

1290


Discuss about db2 bind?

1154


What does reorg do in db2?

1074


How to fetch the last row from the table in SQL (db2)?

1696


Hello All, We have requirment to Replace BMC Db2 Load product thru CA FAST LOADPlus product. Do anyone have JCL to for FAST LOADPLUS and what all are thing need to take in consideration.

2772


How to resolve deadlock issue

20318


Where can you declare a cursor in a cobol-db2 program?

1141


Explain the benefits you can get from mainframe connect?

1015


Can we insert update delete in view?

1028


How many databases are there?

1111


How does a cursor work?

1040


How to restart a DB2 program?

1956


by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?

9358


What is deadlock in db2?

1120