Advertisement

04.30.2008 at 07:29AM PDT, ID: 23365410
[x]
Attachment Details

SQL Server Replace statement

Asked by lrbrister in MS SQL Server, SQL Server 2005

I have a third part stored procedure I need to update.

There's a variable that's arriving as varchar

It then needs to be declared numeric

The problem is that it's a phone number and I need toi strip out the invalid characters to populate the numeric field.
Peeople at times put dashes and other times dots or ()

Little help here?
By the way...I've been told to update the sp and NOT touch any of the ColdFusion or ASPX vb code

Comes in as
@phone      varchar(25),
blah...blah...blah...

Declare @newphone numeric
blah...blah...blah...

if @phone <> null set @newphone = @phone

Start Free Trial
[+][-]04.30.2008 at 07:36AM PDT, ID: 21471056

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 07:56AM PDT, ID: 21471278

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, SQL Server 2005
Sign Up Now!
Solution Provided By: YZlat
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.30.2008 at 08:01AM PDT, ID: 21471338

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.30.2008 at 08:03AM PDT, ID: 21471352

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:14AM PDT, ID: 21471473

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:19AM PDT, ID: 21471535

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.30.2008 at 08:37AM PDT, ID: 21471715

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906