User2014201474 posted
I have the following code use in sql server
strSql = "DECLARE @SeqNo Integer "
strSql += "SELECT @SeqNo = MAX(SeqNo) FROM tblPromotion "
strSql += "SET @SeqNo = ISNULL(@SeqNo,0) "
strSql += "SET @SeqNo = @SeqNo + 1 "
strSql += "INSERT INTO tblAdvertisement(SeqNo) Values (@SeqNo)";
Can anyone tell me in my sql how to declare a variable