Identity insert ON woes...

Results 1 to 2 of 2

Thread: Identity insert ON woes...

  1. #1
    Join Date
    Dec 1969

    Default Identity insert ON woes...

    Hi,<BR>I have to do an identity insert as follows...<BR><BR>******************************** ******************<BR>set identity_insert task on <BR>insert into task (Taskid,Status,TaskTypeID) values (1491,1,1)<BR>************************************ **************<BR><BR>Everything works - no problems ! Unfortunately the table consists of about 30 fields. So this leads to my question. Is there an easier way or do I need to specify every field?<BR>Here&#039;s what I thought would work but alas no joy...<BR><BR>************************************ **************<BR>set identity_insert task on <BR>insert into Task<BR>select * from taskarchive where taskid = 1491<BR>****************************************** ********<BR><BR>By the way I should have stated the Values im trying to insert are from a mirror table.<BR>Appreciate any thoughts...<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Identity insert ON woes...

    If you have EXACTLY the same data structure in BOTH tables you can do this.<BR><BR>insert into Task (select * from taskarchive where taskid = 1491)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts