TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jesupriyan
NA
10
0
How to write procedures with one Parameter even if i declare two parameters?
Feb 15 2010 3:58 AM
Hi!,
I have declared two parameters in Stored Procedures.
I want to write 2 sections.
One section has only one parameter. So I used that parameter only. If I didnt mentions the 2nd parameter in coding means It shows an error.
For Ex.
Fname varchar(50),
DOB Date,
flag varchar(50)
===============
if flag='NameWise' then
select * from tbl_sample where FirstName=Fname;
elseif flag='DateWise' then
select * from tbl_sample where DateofBirth=DOB;
end if;
====================
?????
From the Above when If use 'Name Wise' means I will pass only the 'name'. So It shows 'DOB' error which has not declared.
Reply me soon. Please
Reply
Answers (
4
)
how to get date in different formate in sql
connection using oledb