31 January 2008
Create PROCEDURE usp_MoveSequence]
@ID int,
@Sequence int,
@MoveBy varChar(4)
AS
BEGIN—PROCEDURE
SET NOCOUNT ON;
DECLARE @compateTo INT
DECLARE @compateToMax INT
DECLARE @currentSequence INT
DECLARE @NextSequence INT
DECLARE @NextRecordID INT
IF @MoveBy='UP'
Select TOP 1 @NextSequence=Sequence, @NextRecordID=ID from TableName where sequence<@Sequence ORDER BY sequence DESC
ELSE IF @MoveBy='DOWN'
Select TOP 1 @NextSequence=Sequence, @NextRecordID=ID from TableName where sequence>@Sequence ORDER BY sequence
--ENDIF
IF @NextRecordID<>0
BEGIN
UPDATE TableName SET Sequence=@NextSequence WHERE ID=@ID
UPDATE TableName SET Sequence=@Sequence WHERE ID=@NextRecordID
END
END--PROCEDURE
13 January 2008
Click Here to find really very great information about currency of our country with image preview and it year.
07 January 2008
This templates are available in many formats like Word, Excel, Powerpoint, Once note, Visio
Download many attractive calenders form here.