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
karthik parcha
NA
153
93.1k
Replace Function
Jan 27 2012 4:21 AM
Hi
In my application there is one gridview in that there is two textboxex and two buttons
1)AccountNumber is textbox one button is there to right of the textbox and business name is textbox to the right one button is there
EG:AccountNumber:10509
Businessname:Anderson's "The Grocery Store"
when i enter account number and clicking the button its retreving the businessname in SP it goes to TYPE='AN'
when i enter businessname and clicking the button account number is not retriving in SP it goes to TYPE='BN'
ALTER PROCEDURE [dbo].[DBSP_SF_GetAccountsLikeAccNo]
@AccountNo VARCHAR(20),
@BusinessName VARCHAR(40),
@Type VARCHAR(2)
AS
BEGIN
IF @Type = 'AN'
BEGIN
SELECT AccountNo, BusinessName FROM CustomerDetails WITH (NOLOCK) WHERE AccountNo like @AccountNo + '%'
END
ELSE IF @Type = 'BN'
BEGIN
SELECT AccountNo, BusinessName FROM CustomerDetails WITH (NOLOCK) WHERE BusinessName like REPLACE(@BusinessName, '''', '''''') + '%'
END
END
plz help me this is my SP
how change the SP
Reply
Answers (
1
)
Recovery Method
SQL Server having this two error