c# - if else Statement in stored procedure? -
I have this stored procedure that gets data from excellence and then updates the situation:
ALTER process [DBO]. Start as [Sp_AllocateSerial] @Limit int, @Part varchar (50), @Status varchar (50) - SET added to prevent additional set result on NOCOUNT - Interference with SELECT statement. Set nosenate on; - Include statement for the process here SELECT TOP (@LIMIT) is the partner number, serial number, batch, location, palette number, position dbo.fg_filin where position = 'FG-Fresh' and Partnumber = @part order Part Time & / Code> / Pre> Now:
If my serial number status has been allocated then I want to show an error message that the serial has already been allocated.
Try something like this that I use mostly fake values so that you can get your environment Have to change.
if not existing serial number where serial number = @ circle number and status = 'allocated') // logic, if serial number is not allocated END ELSE BEGIN // serial Number allotted state END
/ div>
Comments
Post a Comment