• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

ASP request from

I'm grabbing the selected data fom a form and sending it to a stored procedure in SQL Server
Request.Form("dptAirSr").ToString()  goes as nvarchar(10)

When they select the number from the dropdown ot plaves this
SelectedItem = 3  stores 3,0,0

How do I strip the commas?
0
Larry Brister
Asked:
Larry Brister
  • 2
  • 2
1 Solution
 
brad2575Commented:
in SQL it would be
REPLACE(Field, ',', '')

0
 
Larry Bristersr. DeveloperAuthor Commented:
brad2575:

I was hoping to strip it on the ASP side.
0
 
BrandonGalderisiCommented:
replace is valid asp syntax as well.  Are you looking to strip the commas, or strip everything to the right of the first comma?
0
 
Larry Bristersr. DeveloperAuthor Commented:
BrandonGalderisi:
Everything to the right includingthe first comma.  There shouldjust be a numbe
0
 
BrandonGalderisiCommented:
SomeVar = SelectedItem....
SomeVar = left(SomeVar, instr(SomeVar,',')-1)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now