Perhaps I'm trying to be too clever for my own good, and I could possibly use a scalar variable to solve this. I'm trying to add 1 to my output from the subquery;
INSERT INTO bookrevisiontbl (revisionnum, bookdate)
SELECT SUM(MAX(revisionnum) + 1), GETDATE() FROM bookrevisiontbl_tbl
However the following error occurs
Cannot perform an aggregate function on an expression containing an aggregate or a subquery.
Is this query possible, and for it to maintain