Hi,
I have the following problem: I have to create a query (SELF-JOIN - f.e. using BUFFER) and write its output to file (f.e. using PUT UNFORMATTED). This is the SQL syntax. Can you help me with rewriting it to Progress 4GL (as I know this is the only way to write output to file, because Progress cannot 'spool' to file from simple SQL as oracle does)?
SELECT p1.emp-no, '0300', p1.dat-beg, p1.dat-end, p1.amount
FROM p_salary p1
WHERE p1.comp-no = 214
AND NOT EXISTS (SELECT *
FROM p_salary p2
WHERE p1.emp-no = p2.emp-no
AND p1.dat-end = p2.dat-end - day (p2.dat-end)
AND p2.comp-no = 210)
Thx in advance. Regards,
Maciej.
I have the following problem: I have to create a query (SELF-JOIN - f.e. using BUFFER) and write its output to file (f.e. using PUT UNFORMATTED). This is the SQL syntax. Can you help me with rewriting it to Progress 4GL (as I know this is the only way to write output to file, because Progress cannot 'spool' to file from simple SQL as oracle does)?
SELECT p1.emp-no, '0300', p1.dat-beg, p1.dat-end, p1.amount
FROM p_salary p1
WHERE p1.comp-no = 214
AND NOT EXISTS (SELECT *
FROM p_salary p2
WHERE p1.emp-no = p2.emp-no
AND p1.dat-end = p2.dat-end - day (p2.dat-end)
AND p2.comp-no = 210)
Thx in advance. Regards,
Maciej.