× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I would go for Mark's idea of a data area, but in stead of using a date I
would use a logical one.

Test for True or False (*ON/*OFF -'1'/'0') whether the programme has run,
set the opposite and if the condition is not fulfiled, run the main body of
the programme.

With regards,
Carel Teijgeler

*********** REPLY SEPARATOR ***********

On 29-9-2010 at 14:03 David FOXWELL wrote:

**************
On Thu, Sep 16, 2010 at 11:39 AM, Charles wrote:

how about:
update ClientTable A
set ClientVersion = (select max(CilentVersion) + 1
from ClientTable B
where a.clientID = b.clientID)
where clientID in (select clientID from NewClientTable);

insert into ClientTable (ClientID, ClientName, ClientVersion)
(select ClientID, ClientName, 0
from NewClientTable);
****************

Charles, (or anyone else). I'm looking at Luis' idea for putting this in a
stored procedure. However, I have a small problem with columns on the
insert.

What the procedure is supposed to do :

1. Take the client record, and update its version number from 0 to n+1
where n is the highest version number in the table for that client.
2. Create a new client record, with the same information as the original,
ie with version number 0, but with the name from the NewClientTable.

Now what if other columns exist in a record, say dateofbirth? This
information is not in NewClientTable. It is in the record that has just
been updated to version number n+1. How can I populate the new record with
this dateofbirth?

Thanks.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


Geen virus gevonden in het binnenkomende-bericht.
Gecontroleerd door AVG - www.avg.com
Versie: 9.0.851 / Virusdatabase: 271.1.1/3162 - datum van uitgifte:
09/27/10 08:34:00




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.