OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

REPLACE FUNCTION

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
briglia23
OOo Enthusiast
OOo Enthusiast


Joined: 24 Jun 2008
Posts: 121

PostPosted: Thu Mar 05, 2009 4:18 am    Post subject: REPLACE FUNCTION Reply with quote

I want to replace the character
Code:
'
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
View user's profile Send private message
QuazzieEvil
Super User
Super User


Joined: 17 Jan 2007
Posts: 599
Location: Houston, TX

PostPosted: Thu Mar 05, 2009 5:43 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
briglia23
OOo Enthusiast
OOo Enthusiast


Joined: 24 Jun 2008
Posts: 121

PostPosted: Thu Mar 05, 2009 5:52 am    Post subject: Reply with quote

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
View user's profile Send private message
briglia23
OOo Enthusiast
OOo Enthusiast


Joined: 24 Jun 2008
Posts: 121

PostPosted: Thu Mar 05, 2009 7:08 am    Post subject: Reply with quote

THank you now it's works
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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