if @ItemID = null Set @ItemID = 0 Terry Broadbent
Please review faq183-874.
"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
Change the Select statement to use the IsNull function. Then you won't need to test later.
Select @ItemID = IsNull(max(ItemID),0) from Table1
Print @ItemID Terry Broadbent
Please review faq183-874.
"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.