What does "SP" mean?
Main Topics
Browse All TopicsI'm using a firebird 1.5 database and am trying to remove all dashes from a field in one of my table's. Is there a command that will do this in SQL. Like replace '-' with ''. I want all the other characters to remain and to strip the dashes. Does anyone know how to do this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
this is aproximately written in PSQL, the language used to write stored procedures, triggers etc in firebird
to enter it the easest way is to use a tool, there are several available. I prefer dev studio from www.sqlly.com (30 free trial available)
Business Accounts
Answer for Membership
by: NickUpsonPosted on 2007-06-13 at 12:26:13ID: 19277311
there is not an easy way, you need to write an SP to do it, something like this.
for select id, textfield from atable into :id, :tfield
do
begin
i = 1;
newstr = '';
while i < max_len;
do
begin
ch = substring(tfield, i, i+1);
if (ch <> '') then
newstr = newstr || ch;
end
update atable set textfield = :newstr where id = :id;
end
you will need to check substring parameters I don't have a manual handy