I'm using OOo 2.0 on an XP SP1 box.

  I have an SQL function written (shown below) that works perfectly.

SELECT First, Last, Email, Expiration
FROM members INNER JOIN membership ON members.MembershipID = membership.MembershipID
WHERE Trial = 'false'
AND Courtesy = 'false'
AND DATEDIFF('day', CURRENT_DATE, Expiration) > -90
AND Email <> ''
ORDER BY Last, First

(The DATEDIFF() function is an HSQL function that subtracts two dates; HSQL doesn't support arithmetic on dates as far as I can tell.)

But I couldn't find a way to save, copy, or otherwise store the SQL query results out of Base.

So I decided to link the SQL query into a report via the Report Wizard. But it complained about not being able to read the column names from the query file. Indeed, it didn't show any column names in the selection list.

Then I thought about abandoning my SQL statement and creating a query through the Query Builder using my clever DATEDIFF() function in a Criteria field for 'Expiration'. But when I do this, the Query Builder complains that I didn't enter a properly formatted DATE value. DATEDIFF() returns an integer, so my criteria is correct.

I'm now out of ideas. Does anyone know a way to get any one of these options to work?

  Shane


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to