Monday, July 14, 2014

Selecting Data from Database - SQR Program using SELECT

1.Open Production Reporting Studio
2.Open SQR Editor
3.Copy below code and save as secondSQRprogram.sqr

begin-program
do list_employees
end-program

begin-heading 4
print 'Employee Listing' (1) center
print 'Employee ID' (3,1)
print 'Employee Name' (,20)
print 'Department' (,35)
print 'Salary' (,55)
end-heading

begin-footing 1
page-number (1,1) 'Page'
last-page () 'of'
end-footing

begin-procedure list_employees
begin-select
employee_id (,1)
first_name (,20)
department_id (,35)
salary (,55)
 position (+1)
from employees
end-select
end-procedure


Output:








No comments:

Post a Comment