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

RE: [sqr-users] Single quote issue



You can take the value  from the run control in a variable.Then use the
Replace funtion to replace the single quote with a double quote.

If replace doesn't work, then in the worst case, I would think of creating
a function which would accept the string with single quotes,unstring it
into 2 of more variables(Unstring function), then string them back with a
double quote using the String function.

Following text is from Peoplebooks. I can suggest you to look the SQR
lang-ref. Best source of info on any SQR problem.

REPLACE :
Inspects the contents of source_value and replaces all occurrences of
from_string with to_string and returns the modified string.

Syntax:

dst_var = replace(source_value, from_string, to_string)

source_value = date or text literal, column, variable, or expression

from_string = text literal, column, variable, or expression

to_string = text literal, column, variable, or expression

dst_var = text variable

Example:

let $replaced = replace($paragraph, 'good', 'excellent')



> Yes, I am aware of that. But that is for the query.
>
> But how about in SQR - I am assuming I would have to do a find and replace
> within the string. So is it that I would have to create a function that
> does
> that and use that function to change that run control param in the SQR?
>
> Thanks,
> Abhay
>
>>From: "Alexander, Steve" <Steven.Alexander@sanjoseca.gov>
>>Reply-To: "This list is for discussion about the SQR database
>>reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
>>To: "'This list is for discussion about the SQR database
>>reportinglanguagefrom Hyperion Solutions.'" <sqr-users@sqrug.org>
>>Subject: RE: [sqr-users] Single quote issue
>>Date: Fri, 28 Oct 2005 17:03:42 -0700
>>
>>You have to replace the single quote with two single quotes.
>>
>>-----Original Message-----
>>From: abhay sachar [mailto:sachar_abhay@hotmail.com]
>>Sent: Friday, October 28, 2005 4:35 PM
>>To: sqr-users@sqrug.org
>>Subject: [sqr-users] Single quote issue
>>
>>Hi,
>>
>>I was wondering if anyone knows how to work with data that is being
>> passed
>>to an SQR through a run-control page and that data has a (') - single
>> quote
>>in it, which could be anywhere , for example - St Martin's Court
>>
>>What is the way to handle this kind of data, because when it builds the
>>query - it bombs out with the error - ORA-01756: quoted string not
>> properly
>>terminated
>>
>>Any help is greatly appreciated.
>>
>>Thanks,
>>Abhay
>>
>>
>>
>>_______________________________________________
>>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
>
>
>
> _______________________________________________
> 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