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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajesh SPosted Feb 23, 2011, 8:44 AM
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
Blocked AccountPosted Feb 7, 2011, 5:35 AM
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
Krishna GaradPosted Feb 7, 2011, 1:26 AM
Create Procedure NameOfSp
(
@year int,
)
as
Begin
select fileno from table where year=@year// from ddlyear
End