I wnat to update a number column with a calculated field from in the same table with an sql . it's posible to be done???
Can you post what you have already tried? Perhaps a little more detail (the field names, the calculation, some sample data - bogus is fine)?
The key word there is "UPDATE". FMP by itself still does not (but should by now, IMHO) support UPDATE SQL (that is, "in-product"). But, don't let that stand in your way. You can get a third-party tool like RazorSQL where you can interactively do updates, deletes, and inserts. If you want to do all this programmatically, you can use the free FMP JDBC driver and write just a little Java code.
Like beverly suggested, however, with more detail, we can better explain possible approaches.
I'm not sure why you want it with SQL, but you can setup the file as ODBC sharing then "Execute SQL" script do it.
FM way to update records like UPDATE statement in SQL is "Replace Field Contents".
(this is the script step that will INSERT, UPDATE, & DELETE - SQL queries to another ODBC/JDBC source)
Replace Field Contents
(script step to replace the value in a field in every record in the found set with a different value.)
the update fields it is very slow!! I made a SQL with BaseElement and in 20 seg is done with replace take more than a minutes only one field
max_bog wrote: the update fields it is very slow!! I made a SQL with BaseElement and in 20 seg is done with replace take more than a minutes only one field
We'll need a lot more detail to help you troubleshoot this, so please post a description of exactly what you are trying to achieve, across how many records... as much detail as possible.
Right, maybe post your script.
REPLACE FIELD CONTENTS is usually quick.
I am trying to update a table arround 1.3 millions records, there is a calculated field that is having a recursive function, and the others fields are normal calculations, like if(x=1;field;""), I mean easy.
the recursive function may have up to 30 loops.
I think sql maybe faster than repalce field.
If you can export a representative sample of your data and the INSERT expression you want to use, I'll try it using actual JDBC and a SQL INSERT statement, but still not enough to go on here.
We don’t know without seeing the recursive function. SQL may be slower (or not). There may be other custom functions that are faster (or not). A little more info please!
Sent from miPhone
Retrieving data ...