Thread: One time only trigger/function on every row...
I didn't even think of this as I was adding books into my database, but I didn't rearrange the titles ('Shining, The' asopposed to 'The Shining') like I should have. I'm writing a function to use as a trigger to check and, if need be, rearrange the titles as they are added to the database,but is there an easy way to loop through all of the records currently in the database and run that function on them? Thanks, Wyatt
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2001 November 17 03:55 pm, wyatt@draggoo.com wrote: > I didn't even think of this as I was adding books into my database, but I > didn't rearrange the titles ('Shining, The' as opposed to 'The Shining') > like I should have. > > I'm writing a function to use as a trigger to check and, if need be, > rearrange the titles as they are added to the database, but is there an > easy way to loop through all of the records currently in the database and > run that function on them? Perhaps SELECT fix_title(*) FROM books WHERE title LIKE 'The %'; - -- Andrew G. Hammond mailto:drew@xyzzy.dhs.org http://xyzzy.dhs.org/~drew/ 56 2A 54 EF 19 C0 3B 43 72 69 5B E3 69 5B A1 1F 613-389-5481 5CD3 62B0 254B DEB1 86E0 8959 093E F70A B457 84B1 "To blow recursion you must first blow recur" -- me -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjv5VEoACgkQCT73CrRXhLH1MACghw4ENekgfdI5mhdiriyEOHi8 RdkAni6t1FbS1NM4DxwNy7YdvB5Xs1sp =F/2e -----END PGP SIGNATURE-----