remove "-" from SQL query results

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
I have values stored in SQL that contain numbers and "-" (so 9999-00-2-3333 for example).

I need them stored like that for most things, but one report I need to pull it for has to be without the "-" in the sequence.

Is there anyway to format those query results within the query itself?

Thanks in advance.
 

Homerboy

Lifer
Mar 1, 2000
30,890
5,001
126
Hey Homer!!!

You can use the "REPLACE" function.

You should try googling for an answer before wasting these good people's time and energy next time!

BTW, you are a handsome fellow!

Enjoy your day!
 

Leros

Lifer
Jul 11, 2004
21,867
7
81
Random SQL fact of the day...

Good to learn a new SQL function. Granted, I try to do a minimal amount of work on the database and then work with the data on another server.
 

Zargon

Lifer
Nov 3, 2009
12,218
2
76
you can do string concatenation as well, but thats more for mixing and matching from different columns
 

AyashiKaibutsu

Diamond Member
Jan 24, 2004
9,306
4
81
I thought there was a way, but didn't have time to google for the exact way when I read this so I didn't post.