Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Parameter data contains single quote, how to let the -DEFAULT and where stat

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Parameter data contains single quote, how to let the -DEFAULT and where stat
 Login/Join
 
Silver Member
posted
The SQL needs to read data in string format as parameters from -DEFAULT. The data may contain single quote as part of the string. WebFocus treats the single quote as the end of the string. Therefore, it causes mismatching of the original second single quote at the end of the string.

For example:

-DEFAULT &FACILITY = ‘BOARDING PLATFORM 20' BAYLINER’
.
.
.
Where FACILITY = ‘&FACILITY’

Are there anyways for me to deal with -DEFAULT and where statements?

This message has been edited. Last edited by: TechLights,


7703 on Linux, Windows
ReportCaster
PDF, HTML, Excel, AHTML, and CSV
 
Posts: 40 | Registered: January 31, 2008Report This Post
Virtuoso
posted Hide Post
To have a quote withing quotes you'll have to "double it".

To later embed your &variable in SQL passthru I would advise that you rely on .QUOTEDSTRING

See this:

-DEFAULT &FACILITY = 'BOARDING PLATFORM 20'' BAYLINER'
.
.
.
SQL
SELECT ... FROM ...
WHERE FACILITY = &FACILITY.QUOTEDSTRING
..
END



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Expert
posted Hide Post
If you are using FOCUS to do the query, then please use WHERE FACILITY EQ '&FACILITY'


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
Thanks for the replies.

The ‘BOARDING PLATFORM 20' BAYLINER’ comes from a drop down selection, how can I find the quote and double it?


7703 on Linux, Windows
ReportCaster
PDF, HTML, Excel, AHTML, and CSV
 
Posts: 40 | Registered: January 31, 2008Report This Post
Expert
posted Hide Post
Have a look at the function STRREP.


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
quote:
how can I find the quote and double it?


You don't have to. That's what .QUOTEDSTRING is supposed to take care of!

If you are providing the value as a constant within your code (your -DEFAULT line) then you'll have to use a double apostrophe as I showed above. FOCUS will still keep one internally.

However, when the variable already contains the internal quote because it was either read that way from a file or provided to it as a parameter (your case) then no extra step is required.

As long as you favour coding &VARIABLE.QUOTEDSTRING over '&VARIABLE' FOCUS will take care of the rest.


The Developing Reporting Application manual contains documentation on .QUOTEDSTRING which you'll surely find useful and does a much better job at explaining this matter.

Hope this helps.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Parameter data contains single quote, how to let the -DEFAULT and where stat

Copyright © 1996-2020 Information Builders