User100706074 posted
HI,
Table Name Images
ReceiptNumber nvarchar(10)
Image1 nvarchar(50)
Image2 nvarchar(50)
Image3 nvarchar(50)
Image4 nvarchar(50)
i need to write a stored procedure which will accomplish the following
Parameters @Image , @Receiptno
The stored procedure must first check for a Null value in Image1 and if value is null then insert @Image in Image1 where ReceiptNumber is @Receiptno . If Image1 is not null then @Image must be inserted in Image2 and so on.
Finally if all the 4 Image fields are full then it should return some error.
Any ideas on this?