Re: How to duplicate a row in SQL Table using a single query

From: TheSqlGuy (TheSqlGuy.1dqkdq_at_mail.mcse.ms)
Date: 10/05/04


Date: Tue, 5 Oct 2004 14:42:37 -0500


Guys, Guys, Guys,

It never ceases to amaze me how so many questions get answered with
another question... instead of an answer.

I have the same question, but I think what the original author is
trying to do here is duplicate the row while allowing the identity/key
to grow on its own... without having to list every other column in the
table. (Hence the * he is wanting to use). Furthermore, the author
would like to accomplish this in a single SQL statement.

Afterall, a primary key is a primary key, and a unique identifier is a
unique identifer.

It seems to me this would be a capability often persued by any seasoned
and active SQL programmer. And thus, I would expect such functionality
from a seasoned language (aka, sql)

With the previous assumption having been made, does anyone have the
answer? Is there a way to duplicate everything in a row except for any
autonumbering identifiers while allowing those autonumbers to
autonumber as they were designed to (without listing every single other
column in the table)?

--
TheSqlGuy
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1119654.html
 


Relevant Pages

  • Query with multiple Exists seems to Hang
    ... MID -- Unique identifier ... EID -- link to N table NID column entry ... I had written a SQL query that works with SQL 2000, ... query into Access directly. ...
    (microsoft.public.access.queries)
  • Re: Access 97 to SQL Conversion
    ... "Dianne" wrote: ... >> data type incompatibilities. ... >>>have the wrong data types in the SQL tables? ... >>>the way I set up Autonumbering in SQL? ...
    (microsoft.public.sqlserver.odbc)
  • Re: A pk is *both* a physical and a logical object.
    ... Codd to designate a specific unique identifier that allows to ... SQL related.. ... primary key whenever a table is created, and making all FK references to ... a major regression in database management in general. ...
    (comp.databases.theory)
  • Re: Access 97 to SQL Conversion
    ... I am upgrading the program as we speak. ... > data type incompatibilities. ... >>queries that are trying to build new records in one of the SQL tables keep ... >>the way I set up Autonumbering in SQL? ...
    (microsoft.public.sqlserver.odbc)
  • SQL autonumbering for multiple clients
    ... most people seem to say that multiple users/clients updating the SQL ... database simultaneously using Clarion's autonumbering will work fine. ... record without worrying about another app doing the exact same thing ...
    (comp.lang.clarion)