Monday 20 February 2012

ProgrammerFail–Stored Procedures

 

I have found this construction in a living project’s db layer:

ALTER PROCEDURE [dbo].[GetSomething] @param VARCHAR(100)
    AS
    BEGIN
    exec [dbo].[GetSomething2] @param
/*
-- Original Select
select .....

*/
END


And what is in the stored procedure that we call:

ALTER PROCEDURE [dbo].[GetSomething2] (
    @param    varchar(100)
) AS
BEGIN
    --- new select
    select ....
    
END

 

Nice code if we collect stored procedures instead of stamps…

ProgrammerFail

!!!FAIL!!!

No comments:

Post a Comment