AnsweredAssumed Answered

Trying to do a simple Update on a field for all records in a table

Question asked by disabled_morkus on Nov 13, 2011
Latest reply on Nov 13, 2011 by disabled_morkus

Title

Trying to do a simple Update on a field for all records in a table

Post

I'm trying to do a simple update on all records for a single field with today's date and time (a timestamp field).

In SQL this is a 2 second-to-write query (a simple UPDATE), but I don't see how to do this in FMP.

I tried to write a script like the one below, but it just hung:

// pseudo code
Select layout "main"
Go to first record
Loop
  Set field to Get(CurrentTimestamp)
  Go to next Record
End Loop

-----

There must be a very quick way to do this type of replace, right?

I'm still baffled why simple SQL is not supported or there is not an "expert mode" -- even if it's in the debugger -- where you can do simple SQL. Perhaps I don't know FMP that well yet, but things that are quick in SQL seem to take a lot of time to figure out the propriertary FMP way...

Thanks in advance.


-m

Outcomes