declare @suppid as varchar(50)
if(@suppid is null)
begin
select isnull(MAX(convert(int,suppid)),0)+1 from us.dbo.supp where ISNUMERIC (suppid)=1
end
What problem are you experiencing? Conversion error? data truncation? output? what is going on?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.