Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)

  • RE: Another Stored Procedure

    haha, unfortunately didn't pass, but give's me a better understanding of how these things work.

  • RE: Another Stored Procedure

    Thanks RGR,

     

    Here's what I have now:

    CREATE PROCEDURE sp_findaddress

            @LAST_NM varchar(25),

            @FIRST_NM varchar(25),

     

    AS

    SELECT PERSON.LAST_NM AND FIRST_NM, ADDRESS.PERSON_ID

    FROM PERSON, ADDRESS

    WHERE PERSON.EMPLOYEE_ID=ADDRESS.ADDR.TEXT

  • RE: Another Stored Procedure

    Anyone else?

  • RE: Another Stored Procedure

    Just an example that I need to put together, but not in actual development, here is what I have so far.

     

    CREATE PROCEDURE sp_findaddress

            @LAST_NM varchar(25),

            @FIRST_NM varchar(25),

     

    AS

    SELECT @LAST_NAME,...

  • RE: Stored Procedure help

    How does this look so far,

    CREATE PROCEDURE find_person_address

            @LAST_NM varchar(40),

            @FIRST_NM varchar(40),

     

    AS

    SET @LAST_NM AND @FIRST_NM =...

  • RE: Stored Procedure help

    Your right guy's, but I'm just generally trying to put something together in theory, this won't actaully be a live procedure, just a general one.

  • RE: Stored Procedure help

    Thanks all, hopefully I'll get there

  • RE: Stored Procedure help

    Does this seem right?

     

     

    CREATE PROCEDURE find_person_address

            @LAST_NM varchar(40),

            @FIRST_NM varchar(40),

      @ADDRESS_TXT

    AS

    SET @PERSON_ID = (SELECT address FROM PERSONS

      WHERE @LAST_NM=@LAST_NM

      AND FIRST_NM=@FIRST_NM)

    RETURN  @ADDRESS_TXT

    GO

  • RE: Writing my first Stored Procedure

    Thanks for the reply!

    The stored procedure should actually return the following items:

     

    Address_ID

    Person_ID

    Address_Text

     

    Would this still be possible with the above code.

     

Viewing 9 posts - 1 through 9 (of 9 total)