hi i have the following, but i want to define @r1 and @r2 etc as querystrings.. how do i do this?:
DECLARE @diff TABLE (
ID bigint,
r1d smallint, r2d smallint, dif int )
INSERT INTO @diff (ID, r1d, r2d)
SELECT ID, r1, r2
FROM dbo.type
UPDATE @diff
SET r1d = r1d-@r1 //(r1 is querystring and how make result show as positive number?)
r2d = r2d-@r2
dif = r1d+r2d
SELECT TOP(1) ID
FROM @diff
ORDER BY dif ASC
...
Go to the complete details ...