Using SED to Replace \|

I have been trying for a couple of hours now to use sed to replace a string in a file. The file is delimited by pipes (|) and I have tried writting the script several different ways.
The problem is that when there is a slash prior to a delimiter that it is being kicked out by my DB. So I am trying to remove them all.

sed -e 's:\|:|:g' input > output
sed -e 's/\|/|/g' input > output

I've also tried sed -e 's/\\|/|/g' input > output and many other variations of this. However so far I have not had any luck.

It will run, however it will not remove the text and replace it with just a pipe.

If anyone has any suggestions it'd be appreciated.

I don't know why you are having trouble.

I can do

$ echo "ret\|foo|hhh\|hhh" | sed 's/\\|/|/g'
ret|foo|hhh|hhh

on Ubuntu, BSD, Mac OS X...

???

I must not be seeing something in your post.

I am running on AIX 5.3, I am not sure if that may be the difference. I am running it over a fairly large file but let me try your example...

I tried your example and it worked fine, let me try to run it on the file again perhaps I am missing something.

Maybe when you said DB you really meant a database file?

Sed works on text files - it will choke and die on things with mixed in binary.

I am running it on a text input prior to trying to load it to a database. Just tried it again and i am checking the output now, so I am not sure if it worked yet.