Linker IT Software
Google
Web www.oraxcel.com
menubar-top-links menubar-top-rechts
Home Help Search Login
Welcome, Guest. Please Login.
SQL*XL: Database to Excel bridge litLIB: Excel power functions pack ExcelLock: Locking and securing your valuable Excel spreadsheets encOffice: Protect your Excel file easy and safe encOffice: Protect your Excel file easy and safe
Pages: 1
Oracle SQL: remove spaces from varchar (Read 40446 times)
Gerrit-Jan Linker
YaBB Administrator
*****




Posts: 10
Oracle SQL: remove spaces from varchar
28.09.06 at 13:35:58
 
Oracle SQL: remove spaces from varchar
 
When retrieving Oracle information into Excel with the SQL*XL software I needed to remove spaces from a varchar2 column. While one can use trim to remove leading and trailing spaces, you need to use a different formula to remove a space inside a string. This is purely an Oracle SQL issue. SQL*XL will only pass the SQL text from Excel to the Oracle database server. It is truely a bridge that makes working with databases in Excel easy.
 
To remove spaces from the varchar column I used the replace function:
 
select replace ('1234 AB',' ',null) from dual
 
This will replace spaces will a null hence stripping the spaces from the string. SQL*XL will return the value without spaces to Excel.
Combine the power of SQL and Excel: use SQL*XL.
SQL*XL: SQL Excel software

Download SQL*XL now!

Back to top
 
« Last Edit: 01.08.11 at 22:35:13 by Gerrit-Jan Linker »  

Gerrit-Jan Linker
Linker IT Software
Email WWW Gerrit-Jan Linker   IP Logged
Pages: 1