On Sep 21, 2006, at 12:52 PM, Matthias Buercher wrote:

if you are starting to have questions like this, then you may need to rethink your database structure. if you rely on an external function tor special sql update sequence to get what you want, you will have soon a problem, where the data is not consistent. what for example, if you need to delete or duplicate the selected row? then you will have 0 or 2 true. you probably need a new table leadguitarrist with the fields band and musicianid.

matthias

On 21 sept. 06, at 08:06, Juan Pablo Garcia wrote:

I have a Real SQL Database and I want to set a boolean column on a record to true, and doing so setting the same column in the rest of records to false. Kind of a radiobutton function. It is as if I have a musicians database and can be one and only "lead guitar" in a band.

I suggest your data representation perhaps should be revised. If you want a way to pick out a particular member of the group, then you could have a related table, that relates the group to the individual within it that you want to pick out.

If you wish, you could then set up a view that presents the data in the form you wish. I can help you with this off-list if you like.

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to