Question

Q9. Please explain for each step in this sample Program? MAIN Step1 DoWhen %Select(EMPLID) SELECT EMPLID...

Q9. Please explain for each step in this sample Program?

MAIN

Step1

DoWhen

%Select(EMPLID) SELECT EMPLID FROM ABC

PeopleCode

SQLExec("SELECT COUNT(*) FROM ABC", &Count);

MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " | &Count);

MessageBox(0, "", 0, 0, "Employee ID in State Record: " | CNU_AET.EMPLID.Value);

SQL

DELETE FROM ABC

Step2

DoWhen

%Select(EMPLID) SELECT EMPLID FROM ABC

PeopleCode

SQLExec("SELECT COUNT(*) FROM ABC", &Count);

MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " | &Count);

MessageBox(0, "", 0, 0, "Employee ID in State Record: " | CNU_AET.EMPLID.Value);

SQL

DELETE FROM ABC

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Q9

  • Application Engine first executes the Select Statement in DoWhen Action.
  • Condition gets satisfies as there are 10 rows.(At least one row needed)
  • In PeopleCode, message will be displayed as

No of Rows in ABC Table: 10

Employee ID in State Record: AA                                                          

  • In SQL Action, All the 10 rows will be deleted from table.
  • As DoWhen is not a looping Action it will not go back to the Select Statement and execute. It comes out from the Step and executes the next Step.
  • In Step2, DoWhen will be executed first.
  • Condition gets fail as there are no rows. So it will not execute the Subsequent Actions PeopleCode and SQL.
  • Assume a Table ABC is having EMPLID field and there are 10 Employee IDs starting from AA, BB, CC, to JJ.
Add a comment
Know the answer?
Add Answer to:
Q9. Please explain for each step in this sample Program? MAIN Step1 DoWhen %Select(EMPLID) SELECT EMPLID...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • thanks Can anyone please explain this sample program in Do While action MAIN Step %Select(EMPLID) SELECT...

    thanks Can anyone please explain this sample program in Do While action MAIN Step %Select(EMPLID) SELECT EM PUD FROM ABC I SQLExec("SELECT COUNT(*) FROM ABC", &Count); MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " | &Count); MessageBox(0, "", 0, 0, "Employee ID in State Record: " | CNU_AET.EMPLID.Value); SQL DELETE FROM ABC WHERE EMPLID IN (SELECT TOP 5 EMPLID FROM ABC ORDER BY EMPLID DESC)

  • $$$ The topic is about application Engine in PeopleSoft MAIN Step1 DoWhile %Select(EMPLID) SELECT EMPLID FROM...

    $$$ The topic is about application Engine in PeopleSoft MAIN Step1 DoWhile %Select(EMPLID) SELECT EMPLID FROM ABC PeopleCode SQLExec("SELECT COUNT(*) FROM ABC", &Count); MessageBox(0, "", 0, 0, "No of Rows in ABC Table: " | &Count); MessageBox(0, "", 0, 0, "Employee ID in State Record:" | CNU_AET.EMPLID, Value); SQL DELETE FROM ABC WHERE EMPLID IN (SELECT TOP 5 EMPLID FROM ABC ORDER BY EMPLID DESC)

  • The procedure is a sample and needs to be modified. The software used is oracle 11g. Provide screen shot of the program running. EX.NO. 6 SQL TRIGGER AIM To develop the package for employee managemen...

    The procedure is a sample and needs to be modified. The software used is oracle 11g. Provide screen shot of the program running. EX.NO. 6 SQL TRIGGER AIM To develop the package for employee management system using SQL triggers. DATABASE SCHEMA EMP (EMPID, NAME, SALARY, COMMISSION, DEPT NO) PROCEDURE STEP 1: Start STEP 2: Initialize the trigger with specific table id STEP 3: Develop and execute SQL trigger to carry out the following action. Create a trigger on EMP table...

  • Please select the output: main         declare X as integer, Y as integer                        &nbsp

    Please select the output: main         declare X as integer, Y as integer                                 set x=1                                 set y=2                                 call sub(x, y)                                 write x                                 write y End program Subprogram sub( integer Num1 as ref, Integer Mum2 as reference)                                                              declare x as integer                                                 set Num1 = 3                                                 set Num2 = 4                                                 set x= 5                                                 write x end subprogram           Please select one:      5/42, 5/34, 5/32, 5/24 What is the output of this...

  • Create the database and tables for the database. Show all SQL statements. Include primary and foreign...

    Create the database and tables for the database. Show all SQL statements. Include primary and foreign keys. Insert data into each table. Show select statements and display the output of each table. Note:Student’s name must be inserted into table as part of the data! Perform the SQL below: Query one table and use WHERE to filter the results. The SELECT clause should have a column list, not an asterisk (*). State the purpose of the query; show the query and...

  • Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee...

    Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee id, first name, last name, job title and email of all employees working in Asia (i.e. all countries coming from the region     ‘Asia’). This query must be implemented as a nested query! (ii) Using SELECT statements of SQL, find the employee id, first name, last name, job title and supervisor id of employees who had worked for more than 3 years and completed...

  • 1.What is the return value if the user try to do the following: SELECT TRUNC (65.73,-2)...

    1.What is the return value if the user try to do the following: SELECT TRUNC (65.73,-2) FROM DUAL; Select one: a. 60 b. 00 c. 0 d. 600 2.Supposed that the user uses the ff SELECT statement: what will be the possible output. SELECT GRADE AS STUDENT MARK FROM GRADE_REPORT; Select one: a. Error because of the keyword AS. b. Error because of missing “” mark. c. Will display the column GRADE rename as STUDENT MAK d. Will display all...

  • I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental...

    I need help with certain questions. Please. 18. 4 points For each Rental, list the Rental ID, Rental date, customer ID, customer first name, customer last name, and count of disks rented; sort by Rental ID. Show the Rental date formatted as ‘mm-dd-yyyy.’ Hint: use a GROUP BY clause. 19. 4 points List the disk ID, title name, rating, format description, and fee amount for all copies rented in Rental 3; sort by disk ID. Show the fee amount formatted...

  • You must assume that the data file and your four function subprograms are located inside the working directory (forder). Please write the main program and each of the four function subprograms. 1. Th...

    You must assume that the data file and your four function subprograms are located inside the working directory (forder). Please write the main program and each of the four function subprograms. 1. The data in the following table are to be read from the file "grades.txt"and processed The grades are in percentages. The format of the data is shown below First Name ID Number Last Name Grades 001AA Tam 78.50 oe 86.45 001AB Gabriel Stuart Thus, there are 4 columns...

  • - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed ...

    - - Requirements Building upon your project 1 and project 2, the park will be a Star Wars themed park. You must design additional parts of the database and create the following SQL Script. Step 1: Create table audits via triggers The system must log any insertion, deletion, or updates to the following tables Employee table (project 1) Job table (project 1) ProjectMain table (Project 2) ActivityMain table (Project 2) . . For each one of the table above, you...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT