Skip to content
Advertisement

Tag: replace

Replace function in SQL Server

I have a string of data I am trying to use the replace function to replace double commas with NULL values Solution But I keep ending up with (The ,,, needs to become ,NULL,NULL, but only becomes ,NULL,,) Here is my sample code I’m using Answer If you do the same replacement twice, any number of sequential commas will get

SQL replace and calculate character length and replace again

I want to do an update on a Firebird table. So far not a problem: Before the update statement my params look like this: After my update the params look like this: So far it’s ok. But the frontend program can not handle this because there is a checksum in the params. The value s:91 is the character length from

How to use Replace/Substitution function in PL SQL

I’ve a doubt regarding replacing / substituting values in PLSQL. I’ve used listagg to segregate n number of values with each and every value being splitted by comma delimiter. For instance when executing the above query it returns 7digit alpha numeric values. For example ABCD123,EFGH456,IJKL789 After storing the above values in a variable. When trying to replace the comma (,)

Replace [ ] bracket in a string

I have a string that includes brackets, [], around a number. Since this string represents my column names for a SQL database I need to remove/replace them. So far I do it in the following way: It works fine, but it looks ugly for me since I have to do that for [1] to [20]. Is there a way to

Advertisement