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. Advertising

  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. Advertising

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. =?Utf-8?B?RGFiYmxlcg==?=
    Replies:
    7
    Views:
    710
    =?Utf-8?B?RHVzdGluIHZhbiBkZSBTYW5kZQ==?=
    Apr 10, 2006
  2. Mike P
    Replies:
    0
    Views:
    3,352
    Mike P
    Jun 19, 2006
  3. iHavAQuestion

    inserting the max colum in the stored proc

    iHavAQuestion, May 13, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    439
    George Ter-Saakov
    May 13, 2008
  4. AlexWare
    Replies:
    2
    Views:
    782
    Paul Uiterlinden
    Oct 23, 2009
  5. c676228
    Replies:
    10
    Views:
    232
    c676228
    Oct 19, 2006
Loading...

Share This Page