Inserting a cloum in a stored procedure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?aUhhdkFRdWVzdGlvbg==?=

    Inserting a cloum in a stored procedure

    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

    #2
    Re: Inserting a cloum in a stored procedure

    Select @var1 = max(col) from othertable

    "iHavAQuest ion" <iHavAQuestion@ discussions.mic rosoft.comwrote in message
    news:43323073-84CD-449C-BC7B-09810F1AC4D7@mi crosoft.com...
    >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
    )
    >

    Comment

    Working...