Assign Value to Parameter
-
Hey, So I am trying to get the Highest MenuOrder Value there is increment that by one and then use that value to insert a new object in with the next highest menu order My attempt so far is as so: Declare @MenuSeed as int Select @MenuSeed = Top(1) MenuOrder From Pages Order By MenuOrder DESC And of course that doesn't work, but I am kinda lost on what to do here, can anyone shed some light? Thanks Alot -Seth
-
Hey, So I am trying to get the Highest MenuOrder Value there is increment that by one and then use that value to insert a new object in with the next highest menu order My attempt so far is as so: Declare @MenuSeed as int Select @MenuSeed = Top(1) MenuOrder From Pages Order By MenuOrder DESC And of course that doesn't work, but I am kinda lost on what to do here, can anyone shed some light? Thanks Alot -Seth
-
Hey, So I am trying to get the Highest MenuOrder Value there is increment that by one and then use that value to insert a new object in with the next highest menu order My attempt so far is as so: Declare @MenuSeed as int Select @MenuSeed = Top(1) MenuOrder From Pages Order By MenuOrder DESC And of course that doesn't work, but I am kinda lost on what to do here, can anyone shed some light? Thanks Alot -Seth
SET @MenuSeed = (Select Top 1 MenuOrder From Pages Order By MenuOrder DESC )
OR
Select Top 1 @MenuSeed = MenuOrder From Pages Order By MenuOrder DESC
Please... SAVE my time by rating the posts that you read!
There are 10 kinds of people in the world: those who understand binary and those who don't.