Stored procedure calls multiple stored procedures 
Author Message
 Stored procedure calls multiple stored procedures

I've got some maintenance stored procedures I wanted to group into a single
stored procedure and run.  Everything runs great individually.

However, whenever I try put all the stored procedures into a single stored
procedure I'm finding some of them aren't inserting all the records.  When I
pull that single line call out and run it form the query analyzer everything
runs correctly.

i.e.
EXEC dbo.sp_LICXPRODINSERT 'contact2.uedistat', 'EDIXMIT',
'contact2.uediformt'
EXEC dbo.sp_LICXPRODDELETEFROMGM 'contact2.uedistat', 'EDIXMIT',
'contact2.uediformt'
EXEC dbo.sp_LICXPRODUPDATEFROMGM 'contact2.uedistat', 'EDIXMIT',
'contact2.uediformt'

EXEC dbo.sp_LICXPRODINSERT 'contact2.uacctstat', 'ACCOUNTING', '''0'''
EXEC dbo.sp_LICXPRODDELETEFROMGM 'contact2.uacctstat', 'ACCOUNTING', '''0'''
EXEC dbo.sp_LICXPRODUPDATEFROMGM 'contact2.uacctstat', 'ACCOUNTING', '''0'''

When this is run from an individual stored procedure, the licxprodinsert for
'ACCOUNTING' fails to add all the records.  but when run individually from
Query Analyzer it works fine, so the licxprodinsert stored procedure seems
to be working correctly.  I dont' know if I need to switch cursors or what.

Thanks in advance.



Sat, 12 Aug 2006 00:38:26 GMT
 Stored procedure calls multiple stored procedures

If you post the ddl+sample data+sproc code, maybe someone can have a closer
look. It's hard for us to know what's going without some repro script.

--
-oj
http://www.rac4sql.net


Quote:
> I've got some maintenance stored procedures I wanted to group into a
single
> stored procedure and run.  Everything runs great individually.

> However, whenever I try put all the stored procedures into a single stored
> procedure I'm finding some of them aren't inserting all the records.  When
I
> pull that single line call out and run it form the query analyzer
everything
> runs correctly.

> i.e.
> EXEC dbo.sp_LICXPRODINSERT 'contact2.uedistat', 'EDIXMIT',
> 'contact2.uediformt'
> EXEC dbo.sp_LICXPRODDELETEFROMGM 'contact2.uedistat', 'EDIXMIT',
> 'contact2.uediformt'
> EXEC dbo.sp_LICXPRODUPDATEFROMGM 'contact2.uedistat', 'EDIXMIT',
> 'contact2.uediformt'

> EXEC dbo.sp_LICXPRODINSERT 'contact2.uacctstat', 'ACCOUNTING', '''0'''
> EXEC dbo.sp_LICXPRODDELETEFROMGM 'contact2.uacctstat', 'ACCOUNTING',
'''0'''
> EXEC dbo.sp_LICXPRODUPDATEFROMGM 'contact2.uacctstat', 'ACCOUNTING',
'''0'''

> When this is run from an individual stored procedure, the licxprodinsert
for
> 'ACCOUNTING' fails to add all the records.  but when run individually from
> Query Analyzer it works fine, so the licxprodinsert stored procedure seems
> to be working correctly.  I dont' know if I need to switch cursors or
what.

> Thanks in advance.



Sat, 12 Aug 2006 01:56:37 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Stored Procedure that calls multiple stored procedures

2. Calling Stored Procedure that calls Stored Procedure in ASP

3. Calling a Java Stored Procedure from another Java Stored Stored Procedure

4. Stored Procedure calling Stored Procedure

5. Call a stored procedure from another stored procedure

6. Calling a stored procedure with parameters from another stored procedure

7. Calling a Stored Procedure from a Stored Procedure

8. How to call an Oracle Stored procedure from MSSQL Server Stored Procedure

9. Calling a stored procedure with parameters from another stored procedure

10. Calling stored procedures from another stored procedure

11. Call a stored procedure in another stored procedure

12. return select values in stored procedure to a calling stored procedure


 
Powered by phpBB® Forum Software