Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Muliple Records into a Table with a Serial Field

Status
Not open for further replies.

jtarry

IS-IT--Management
Mar 10, 2010
22
GB
This is the insert statement I am trying:

There is a serial number field in the table, I dont select it in the insert.

insert into mastshed (mastpart,mastdate,mastqty,mastref,mastsale,mastitem,mastord,
mastadj, masttype, mastissue, mastshdate, mastcommit, mastissueno)

select cpart,cdate1,cqty,cref1,cmastsale,cmastitem,cqty,'N','BLANKET',1,cmastschddatw,0,' ' from jdtfordedi

error message:
Explicit value must be specified for identity column in table 'mastshed' when IDENTITY_INSERT is set to ON

Even if I add this into my statement it still does not work

Thanks
 
Have you tried setting Identity_Insert to OFF?

djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top