CREATE SEQUENCE batchnumber AS [integer] START WITH (select max(bat_number) + 1 from Batches where bat_brnfk = (select app_itemvalue from appinfo where app_item = 'branchpk')) INCREMENT BY 1 NO CACHE goI get a red squiggly line under the left bracket after "START WITH": Incorrect syntax near '('. Expecting '+','-', INTEGER, or NUMERIC.