jomali wrote:

> On Wed, Dec 9, 2009 at 4:49 AM, Jonathan Kaye <[email protected]> wrote:
> 
>> This is a simple question but hours of searching various documents hasn't
>> turned up an answer yet. In a spreadsheet I can assign a function whose
>> argument is a cell to perform an operation that is displayed in the cell
>> containing the function call. Thus, if cell B1 has the formula =upper(A1)
>> and A1 has a string "Hello world", then B1 will display "HELLO WORLD". I
>> can
>> also use a macro in a similar fashion to map one string of characters
>> onto another.
>>
>> My question is: how do I do this in a database? I would like to define a
>> field in a query whose value is calculated by applying my macro to the
>> value
>> of another field. I have a field called "ENTRY" in my database and I
>> would like to create another field whose value is FIXSORT(ENTRY) where
>> FIXSORT is a macro that I've written which maps one string onto another
>> one. I assume this is done using a query but I've been unable to figure
>> out how to create the calculated field.
>>
>> Thanks for any help.
>> Jonathan
>> --
>> Registerd Linux user #445917 at http://counter.li.org/
>> Please do not send me copies of list mail. I read the lists. Thanks!
>>
>> I doubt that you can do it with an OOo macro (others may know more).
> However, you can probably do what you want with SQL, depending on the DBMS
> you are using and the actual substitution you would like to make. In your
> example, you can formulate an SQL query using the UPPER function to
> display Hello World as HELLO WORLD. For a more complex query, you might
> want to consider using the stored procedure or function capabilities of
> you DBMS.
> 
> John
Thanks John. My macros are extremely specific to a given task and could only 
be created via a macro programming language (such a the variety of basic 
used in openoffice). I use the dbms supplied by openoffice (mysql?). I have 
not been able to find any mention of how to use macros created in openoffice 
for calculated fields. I guess it can't be done.
Thanks again.
Jonathan

-- 
Registerd Linux user #445917 at http://counter.li.org/
Please do not send me copies of list mail. I read the lists. Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to