Focal Point
[CLOSED] I am trying to Replace a String with a SQL text, but cannot pass the same.

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2197036876

September 29, 2015, 07:32 AM
iBeny
[CLOSED] I am trying to Replace a String with a SQL text, but cannot pass the same.
-SET &listsec_as = IF &listsec_as.LENGTH GT 3 THEN STRREP(&listsec_as.LENGTH,&listsec_as,14,'Comp_Qualifier',142,'case when component_qualifier.qualifier IS NULL THEN ' NONE' else component_qualifier.component_qualifier end AS Component_Qualifier',300,'A300') ELSE &listsec_as;


As ' NONE' is in the quotes, i am not able to pass this string as a replacement string.
Please help, how can i replace this string in STRREP function.

This message has been edited. Last edited by: <Kathryn Henning>,


Webfocus 8105,8808,7703,7611, EXL2K,HTML,PDF,COMT,AHTML Info Assist+ , Reportcaster
September 29, 2015, 07:55 AM
GamP
-SET &listsec_as = IF &listsec_as.LENGTH GT 3
-                  THEN STRREP(&listsec_as.LENGTH,
-                              &listsec_as,14,
-                              'Comp_Qualifier',
-                              142,
-                              'case when component_qualifier.qualifier IS NULL THEN ' | ''' NONE''' | ' else component_qualifier.component_qualifier end AS Component_Qualifier',
-                              300,
-                              'A300')
-                  ELSE &listsec_as;
This might be a start.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
September 29, 2015, 06:06 PM
Waz
FYI:

In FOCUS code two single quotes in Diaglog Manager (dash commands) in a quoted string equals one single quote.

e.g.

-SET SingleQuote = '''' ;
-SET InString = 'I Don''t Like Mondays' ;


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!