Group Insert with a Stored Procedure 
Author Message
 Group Insert with a Stored Procedure

Does anyone see a problem with a stored procedure that inserts several
records at the same time?  Such as

INSERT INTO SFSummary
    SELECT DISTINCT
            2001062, B.AreaCatKey, A.BranchCatKey, A.ChannelBTCatKey,
A.ChainCatKey,
            Left(System_User, 10), getdate(), Left(Host_Name(), 10),
getdate()
    FROM SFComboBranchChannelChain A
        INNER JOIN SFSummaryAreaBranch B
        ON A.BranchCatKey = B.BranchCatKey
    WHERE
    A.BranchCatKey IN (22100, 22110, 22120, 22130)
    AND A.ChannelBTCatKey IN (1, 3, 5, 7)
    AND A.ChainCatKey IN (10, 20, 30, 40)

It works I was just wondering if there was some sort of a problem doing
things this way.

Thanks
Jim Ley



Mon, 24 Nov 2003 07:33:26 GMT  
 Group Insert with a Stored Procedure

Quote:
> Does anyone see a problem with a stored procedure that inserts several
> records at the same time?  Such as

> INSERT INTO SFSummary
>     SELECT DISTINCT
[...]
> It works I was just wondering if there was some sort of a problem doing
> things this way.

Nope, that is in fact how you do it!

Phillip Lindman, MCP



Mon, 24 Nov 2003 23:29:17 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. To Stored Procedure or not to stored procedure

2. To stored procedure or not to stored procedure

3. sub report changes its source stored procedure to main report's stored procedure

4. To stored procedure or not to stored procedure

5. ado recordsets from stored procedures, stored procedures have input parameters

6. Grouping by a stored procedure return field

7. Error when running Insert Stored Procedure from Visual Basic

8. Can't insert decimal into DB using stored procedure

9. Stored Procedure - Insert & Return Unique ID

10. Stored Procedure w/parameter using INSERT

11. Stored Procedure Insert Problems

12. Returned recordset is closed when executing stored procedure with Insert Into statement

 

 
Powered by phpBB® Forum Software