Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 HOW 2 INSERT DATA INCREMENT WITH STORED PROCEDURE?

Author  Topic 

zakyfirdaus
Starting Member

6 Posts

Posted - 2005-09-12 : 23:22:55
Hai ALL,

i have 2 table,
first table is CUSTOMER table that have 2 field (id_cust,id_support)
second table is SUPPORT table that have 3 field (id_support, support_name,role)

CUSTOMER TABLE
id_cust id_support
3301 0
3302 0
3303 0
3304 0
3305 0
3306 0

SUPPORT TABLE
id_support support_name role
011 john 2
012 smith 3
013 rina 4

i wanna insert data from SUPPORT TABLE (id_support) to CUSTOMER TABLE (id_support) incrementally based on sum of id_support
and i wanna use a stored procedure to execute that..

n the result that i want is :

CUSTOMER TABLE
id_cust id_support
3301 011
3302 012
3303 013
3304 011
3305 012
3306 013

SOMEBODY PLEASE HELP ME....
THANX BEFORE...

REGARD ZAC

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-09-13 : 11:35:59
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page
   

- Advertisement -