Search results

  1. M

    Insert From Select

    Hi, I try to select data from one table and insert into another using one query. I've made it like this: INSERT INTO z_conversion01 (emp-no, month, year, comp-amt) SELECT emp-no, month, year, SUM(comp-amt) FROM p_sal_comps WHERE year > 2006 AND comp-no IN (403, 409, 465...
  2. M

    Date calculations

    Hi, I have the following problem: I have to calculate the first and the last day of the month, which is X months before given date. For example: today is the 6th of February, 2007, and I have to find the first and the last day of December 2006 (given date - 2 mths) to extract payment...
  3. M

    How to implement "NOT EXISTS"?

    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...
Top