Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix syntax

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
PLEASE, PLEASE, PLEASE come to my rescue.
I an Oracle expert but now I have been asked to convert informix codes to Oracle.
What I would like your help on are:
1, can explain what the phrase ON EVERY ROW. Does it mean
like a for loop ( for i in 1..count)?
2, Before group,
3, After group
4, group count using,
5, group total.
I suspect that group count means group by.
Please do the best you can to break them down with examples.
thank you!
tankem
 
Hi Tankem,

Whatever you have asked is all part of 4GL Report in Informix.

ON EVERY ROW is used to print or manipulate each row sent to the report from the main routine. The main routine sends rows one by one for printing and any operation to be carried out on that data and actual prnting of that row will done under the statments following EVERY ROW clause till it reaches other clause or end of report as the case may be.

BEFORE GROUP is used for initialising or totalling before the group starts. For E.g. Suppose if you want to initialise some variables when a new customer starts or new employee starts. The group by will be used as BEFORE GROUP OF CUSTOMER/EMPLOYEE.

AFTER GROUP is the similar to BEFORE GROUP but this will activated after the particular group is over and before starting next group. This is like triggers in ORACLE. The before commit/UPDATE/INSERT etc.

GROUP TOTAL is used to total some value related to the group. Suppose on every row if you have printed the employees salary departmentwise. When next department comes you can total salary for department using group total.

G.R.P.

 
GRP, thank you very much. You have done a great job of clarifying a lot of things.
I actually was going in the wrong direction till now.
I just one last question.
on the ON EVERY ROW clause, can I interprete that as a FOR LOOP?
I guess that one is kind of fuzzy to me right now.
It appears that it means for loop but I need clarification.
tankem
 
Hi Tankem,

ON EVERY ROW will work on all rows selected in foreach statment. It is like a FOR loop selecting a set of records from the table.

G.R.P.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top