Hi,
Please I need one help.. I am doing one gift giving project. In that I already insert one table like,
Field name: amount Gift
10000 Bag
20000 Mobile
30000 Watch
Now I want to get if my amount in textbox is 25000 mobile gift is fetch to another textbox and also want to check if my amount in in between 10000 to 19999 gift is bag and same for all....
Please Help me very urgent.....
Thanks in advance to all
Ranjit PowarPosted Jun 14, 2014, 12:49 PM
Create procedure SP_DEMO
@Amount decimal(18,2)
As
if @Amount between 10000 and 19999
Begin
Select Gift from Table_3
Where Amount=10000
End
Else if @Amount between 20000 and 29999
Begin
Select Gift from Table_3
Where Amount=20000
End
Else if @Amount between 30000 and 49999
Begin
Select Gift from Table_3
Where Amount=30000
End