Inserting a cloum in a stored procedure

Discussion in 'ASP .Net' started by iHavAQuestion, May 13, 2008.

  1. I have stored procedure
    In @var1/Col1 I need to insert, the max(col) from another table in the
    same database.


    Create Stored Procedure Name
    (
    @Var1
    @Var2
    @Var3
    )
    Inseret into table1
    (
    Col1
    col2
    col3
    )
    Values
    (
    @Var1
    @Var2
    @Var3
    )
     
    iHavAQuestion, May 13, 2008
    #1
    1. Advertisements

  2. iHavAQuestion

    Jeff Dillon Guest

    Select @var1 = max(col) from othertable

    "iHavAQuestion" <> wrote in message
    news:...
    >I have stored procedure
    > In @var1/Col1 I need to insert, the max(col) from another table in the
    > same database.
    >
    >
    > Create Stored Procedure Name
    > (
    > @Var1
    > @Var2
    > @Var3
    > )
    > Inseret into table1
    > (
    > Col1
    > col2
    > col3
    > )
    > Values
    > (
    > @Var1
    > @Var2
    > @Var3
    > )
    >
     
    Jeff Dillon, May 13, 2008
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sarmad Aljazrawi

    New Stored Procedure Template in .Net

    Sarmad Aljazrawi, Dec 16, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    637
    Sarmad Aljazrawi
    Dec 16, 2003
  2. ES
    Replies:
    2
    Views:
    1,718
    jgy3183
    Aug 20, 2004
  3. Patrick
    Replies:
    2
    Views:
    6,091
    Gopinath S
    Feb 15, 2005
  4. =?Utf-8?B?RGFiYmxlcg==?=
    Replies:
    7
    Views:
    839
    =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZQ==?=
    Apr 10, 2006
  5. Mike P
    Replies:
    0
    Views:
    3,575
    Mike P
    Jun 19, 2006
  6. iHavAQuestion

    inserting the max colum in the stored proc

    iHavAQuestion, May 13, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    591
    George Ter-Saakov
    May 13, 2008
  7. AlexWare
    Replies:
    2
    Views:
    960
    Paul Uiterlinden
    Oct 23, 2009
  8. c676228
    Replies:
    10
    Views:
    332
    c676228
    Oct 19, 2006
Loading...