I'm using Google Sheets with an imported CSV.
The range I perform queries on is called 'Import'
I need to do simple string functions, like REPLACE()
and LEN()
to evaluate if the data I have is acceptable.
I've been searching, and cannot find any way to manipulate strings in Google Query Language?
Other sources suggest I can use 'Standard' SQL, but I don't seem to be able to?
Any ideas where to look and learn? This language doesn't seem well supported and I couldn't find any IRC groups either.
What I have:
=query(Import,"select A,B,F,E,AL where not AL matches '^[A-Za-z]{2}[ ]{0,1}[0-9]{2}[ ]{0,1}[a-zA-Z]{3}$'")
What I want: (T-SQL)
=query(Import,"select A,B,F,E,AL where not REPLACE(AL," ","") matches '^[A-Za-z]{2}[ ]{0,1}[0-9]{2}[ ]{0,1}[a-zA-Z]{3}$'")