Tim
asked on
Dynamically add Ids by 1 in SQL insert.
Hello Experts,
I am inserting data into a single table and I would like to do this in bulk. The only thing that is stopping me is one field that does not accept nulls and is an id that I assign to each item. I am trying to create a procedure that will dynamically add this field (i++) instead of me going in one by one.
Is this possible? Do I need to use script?
thanks.
I am inserting data into a single table and I would like to do this in bulk. The only thing that is stopping me is one field that does not accept nulls and is an id that I assign to each item. I am trying to create a procedure that will dynamically add this field (i++) instead of me going in one by one.
Is this possible? Do I need to use script?
thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok, but what if there are two fields? Will MS SQL let me have two fields with Identity turned on?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks.
ASKER