|
-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Charles Wilt
Envoyé : vendredi 12 novembre 2010 15:46
À : Midrange Systems Technical Discussion
Objet : Re: SQL Duplicate client1 to create client2
Insert into clientfile
select client2, key2, fld3, fld4, ....
from clientfile A
where clientid = client1
and not exists( select * from clientfile B
where b.clientid = client2
and b.key2 = a.key2
)
HTH,
Charles
On Fri, Nov 12, 2010 at 9:15 AM, David FOXWELL
<David.FOXWELL@xxxxxxxxx> wrote:
with SQL?
Can I copy all of client1's records to a new client client2
Ie, copy all the data but with a different clientIdsupplied by my program.
the client2 will never exist at this time but you never know!
Something like :
Insert into clientfile
select *from clientfile where clientid = client1 ( but replacing
client1 with client2)
How should I protect against duplicate records? Normally
(MIDRANGE-L) mailing
Thanks.
--
This is the Midrange Systems Technical Discussion
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,please take
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting,
a moment to review the archives at--
http://archive.midrange.com/midrange-l.
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.
As an Amazon Associate we earn from qualifying purchases.
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.