473,385 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

is there a function which elminates spaces?

In a WHERE clause, I want to to compare strings ignoring the spaces
inside them. Is therd a function to do that? I do not find it in the
documentation.

SELECT ... WHERE (ignore_spaces(table.phone_number) ~* igore_spaces(?));

would be fine but ignore_space() does not exist!
Maybe there is a solution based on regular epxression, but I do not see it.
Nov 23 '05 #1
1 2448
"Pierre Couderc" <pi****@couderc.ccNOSPAM> schreef in bericht
news:dj***********@biggoron.nerim.net...
In a WHERE clause, I want to to compare strings ignoring the spaces
inside them. Is therd a function to do that? I do not find it in the
documentation.

SELECT ... WHERE (ignore_spaces(table.phone_number) ~* igore_spaces(?));

would be fine but ignore_space() does not exist!

Try translating [only] space(s) to .. nothing:
SELECT ... WHERE translate(table.phone_number,' ','') = translate(?,' ','');

be aware this will never use an index!

HansH
Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
OK: Purpose: Using user's input and 3 recursive functions, construct an hour glass figure. Main can only have user input, loops and function calls. Recursive function 1 takes input and displays...
4
by: sam | last post by:
Hi, I can't figure out what is the problem of the following coding. #ifndef __PARSER__ #define __PARSER__ #include <iostream> #include <string> #include <fstream> //#include <exception>
12
by: AMT2K5 | last post by:
Hello. I have the following function titled cleanSpace that recieves a string and cleans it up. My program passes a string to the function via "cleanSpace(c)". The function works the first time...
12
by: Aff | last post by:
Brothers , i am facing a problem which is as follow: class poly { private: char name; int capacity; public: poly(char , int );
8
by: Mike | last post by:
Am trying to open a Microsoft Word .doc file using Access 2000 with Shell function (on Windows XP Operating system) Here is the code : Shell "C:\Program Files\Microsoft...
3
by: FunkHouse9 | last post by:
I'm working on a form to collect data in a textarea which and am trying to keep returns and spaces. I have a couple of functions that I Frankensteined together to replace returns with <br> and to...
2
by: sitko | last post by:
Hi, I'm in the process of converting a VB.net program into a C program so it can run on a unix like machine. I've been moving along at a nice pace, but this conversion has stumped me. I need...
121
by: swengineer001 | last post by:
Just looking for a few eyes on this code other than my own. void TrimCString(char *str) { // Trim whitespace from beginning: size_t i = 0; size_t j; while(isspace(str)) {
12
by: ptn | last post by:
Hi everybody, I have a weird problem. Say I have a .py file with some functions in it, like this: # (...) def foo(): print("bar") When I open it and add a line to one of the functions,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.