Basically What I want to do is
if the count of rows for a job is > 480. I want to select all but the most current 480 so I can bulk transfer those out to a history table
public void DoMove(int jobID)
DECLARE @TheCount INT;
SET @TheCount = SELECT COUNT(UID) FROM SS_Pressure WHERE JobID = "+ JobID +";
IF @TheCount > 480
SELECT Top ? FROM SS_Pressure Where JobID = "+ JobID +"
this is pseudo code I just need help with the queries