Hi friends,
Im having 2 dropdownlist.In the 1st one im having years. Here my pbm is i want to display the file no(into the DDlist2) according to the selected year in the DDlist1.
Please tell me the stored procedure query for this pbm
Stored procedure
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Krishna GaradRank #191 · 12.8K reputationPosted Feb 6, 2011, 8:26 PM EST
Create Procedure NameOfSp
(
@year int,
)
as
Begin
select fileno from table where year=@year// from ddlyear
End
Blocked AccountRank #403 · 6.2K reputationPosted Feb 7, 2011, 12:35 AM EST
Use datepart in your datetime column
like that
Create Procedure NameOfSp
(
@year int
)
as
Begin
select fileno from table where DATEPART(YEAR,DateTimeColumnName)=@year
End
Rajesh S108 reputationPosted Feb 23, 2011, 3:44 AM EST
i hope it may help you
create procedure sp_name
@year int
as
begin
select fileno from your_table_name where year(datetime_column_name)=@year
end