Subject Re: update query
Author Fr. Robert Bower
that syntax seems to work if you had only one record to update but
what would you do if you have multiple records to update?

Thanks

Fr. Robert

--- In firebird-support@yahoogroups.com, Hans <hhoogstraat@s...>
wrote:
> maybe along the lines of:
>
> update ticketsaudit a
> set a.house_uniquenum =
> (select b.house_uniquenum from tickets b
> where a.ticket_uniquenum = b.ticket_uniquenum),
> a.mud_uniquenum =
> (select b.mud_uniquenum from tickets b
> where a.ticket_uniquenum = b.ticket_uniquenum)
>
> ----- Original Message -----
> From: "Fr. Robert Bower" <robertb@l...>
> To: <firebird-support@yahoogroups.com>
> Sent: Friday, July 15, 2005 12:06 PM
> Subject: [firebird-support] update query
>
>
> >I am trying to write an update query and I am having problems
with
> > the firebird syntax.
> >
> > The query involves 2 tables that are identical in structure but
one
> > has updated data from another database
> >
> >
> > I want to match up the keys then update the data from the one
table
> > to the second table
> >
> > An example that works in a Access but not in firebird is as
follows
> >
> > UPDATE Contacts INNER JOIN Contacts1 ON Contacts.ContactID =
> > Contacts1.ContactID SET Contacts.FirstName =
Contacts1.FirstName,
> > Contacts.LastName = Contacts1.LastName;
> >
> >
> > What would be the proper syntax for Firebird.
> >
> > Thanks,
> >
> > Fr. Robert
> >
> >
> >
> >
> >
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Visit http://firebird.sourceforge.net and click the Resources
item
> > on the main (top) menu. Try Knowledgebase and FAQ links !
> >
> > Also search the knowledgebases at http://www.ibphoenix.com
> >
> >
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >