| View previous topic :: View next topic |
| Author |
Message |
briglia23 OOo Enthusiast

Joined: 24 Jun 2008 Posts: 121
|
Posted: Thu Mar 05, 2009 4:18 am Post subject: REPLACE FUNCTION |
|
|
I want to replace the character with the empty, not a blank space, but the empty.
i try to do this but it doesn' works
REPLACE(CONCAT("Dati_utenti"."Cognome" ,SUBSTRING("Dati_utenti"."Nome",0,1)),''','')
can you help me?
thanks |
|
| Back to top |
|
 |
QuazzieEvil Super User

Joined: 17 Jan 2007 Posts: 599 Location: Houston, TX
|
Posted: Thu Mar 05, 2009 5:43 am Post subject: |
|
|
I think the problem is the quoting for the search string:
You need to double quote the single quote (apostrophy): "'"
---------------EDIT-----------------
I just realized that will not work, as the double quote is needed here to quote names, so thus need single quotes for string. SO, you need to escape the single quote with another single quote
| Code: |
REPLACE("Name",'''','')
|
_________________ Free Docs @ http://www.baseprogramming.com/resources.html
Book @ lulu.com http://www.lulu.com/content/2455551 |
|
| Back to top |
|
 |
briglia23 OOo Enthusiast

Joined: 24 Jun 2008 Posts: 121
|
Posted: Thu Mar 05, 2009 5:52 am Post subject: |
|
|
it doesn' works
this is my query
| Code: | SELECT "Dati_utenti"."Cognome","Dati_utenti"."Nome","Elenco_HW"."User Name" FROM "Elenco_HW" AS "Elenco_HW", "Dati_utenti" AS "Dati_utenti" WHERE
UPPER("Elenco_HW"."User Name") = REPLACE(CONCAT("Dati_utenti"."Cognome" ,SUBSTRING("Dati_utenti"."Nome",1,1)),"'","") |
but return me an unexpeted term error with ' |
|
| Back to top |
|
 |
briglia23 OOo Enthusiast

Joined: 24 Jun 2008 Posts: 121
|
Posted: Thu Mar 05, 2009 7:08 am Post subject: |
|
|
| THank you now it's works |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|