[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Putting single quotes in a string



SQR-USERS,

> > let $a = '''' || replace($a , ',' , ''',''') || ''''

Should actually be:

  let $a = replace($a , ',' , ''',''')
  let $a = '''' || $a || ''''

if you're running a version of SQR less than 8.0.  This works around a
a bug in the replace function that occurs when you replace a shorter
string with a longer string.

Ray

> > 
> > On Thu, 11 Mar 2004, Ewan Kho wrote:
> > 
> > > 
> > > I have not actually tried it, but maybe you can use the function
> > replace to 
> > > change all the commas into ','
> > > 
> > > 
> > > >From: "Turner, Ivan" <Ivan.Turner@qwest.com>
> > > >Reply-To: "This list is for discussion about the SQR database 
> > > >reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
> > > >To: <sqr-users@sqrug.org>
> > > >Subject: [sqr-users] Putting single quotes in a string
> > > >Date: Wed, 10 Mar 2004 23:13:40 -0600
> > > >
> > > >If I have a string:
> > > >$a = 'abc,def,ghi' as user input
> > > >
> > > >How can I make it look like 'abc','def','ghi'?
> > > >
> > > >I tried "translate" and can't get it to work.  Does anyone know of a
> > 
> > > >function available to do this?  Maybe I have to resort to parsing
> > the 
> > > >string and rebuilding it via hard coded logic.
> > > >
> > > >Any suggestions?
> > > >
> > > >_______________________________________________
> > > >sqr-users mailing list
> > > >sqr-users@sqrug.org 
> > > >http://www.sqrug.org/mailman/listinfo/sqr-users 
> > > 
> > > _________________________________________________________________
> > > The new MSN 8: smart spam protection and 2 months FREE*  
> > > http://join.msn.com/?page=features/junkmail 
> > > 
> > > 
> > > _______________________________________________
> > > sqr-users mailing list
> > > sqr-users@sqrug.org 
> > > http://www.sqrug.org/mailman/listinfo/sqr-users 
> > > 
> > 
> > -----------------------------------------------------------------------
> > Donald Mellen  | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
> > 
> > donm@ontko.com |  "In the beginning, there was nothing, which
> > exploded"
> > 
> > 
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org 
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> > 
> > _______________________________________________
> > sqr-users mailing list
> > sqr-users@sqrug.org
> > http://www.sqrug.org/mailman/listinfo/sqr-users
> > 
> 
> -----------------------------------------------------------------------
> Donald Mellen  | Ray Ontko & Co. - Richmond, IN - http://www.ontko.com/
> donm@ontko.com |  "In the beginning, there was nothing, which exploded"
> 
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
----------------------------------------------------------------------
Ray Ontko   rayo@ontko.com   Phone 1.765.935.4283   Fax 1.765.962.9788
Ray Ontko & Co.   Software Consulting Services   http://www.ontko.com/

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users